diff --git a/django/contrib/markup/templatetags/markup.py b/django/contrib/markup/templatetags/markup.py
index a8a09ce..df8dfd1 100644
a
|
b
|
def textile(value):
|
26 | 26 | except ImportError: |
27 | 27 | if settings.DEBUG: |
28 | 28 | raise template.TemplateSyntaxError, "Error in {% textile %} filter: The Python textile library isn't installed." |
29 | | return mark_safe(value) |
| 29 | return value |
30 | 30 | else: |
31 | 31 | return mark_safe(textile.textile(value, encoding=settings.DEFAULT_CHARSET, output=settings.DEFAULT_CHARSET)) |
32 | 32 | textile.is_safe = True |
… |
… |
def markdown(value):
|
37 | 37 | except ImportError: |
38 | 38 | if settings.DEBUG: |
39 | 39 | raise template.TemplateSyntaxError, "Error in {% markdown %} filter: The Python markdown library isn't installed." |
40 | | return mark_safe(value) |
| 40 | return value |
41 | 41 | else: |
42 | 42 | return mark_safe(markdown.markdown(value)) |
43 | 43 | markdown.is_safe = True |
… |
… |
def restructuredtext(value):
|
48 | 48 | except ImportError: |
49 | 49 | if settings.DEBUG: |
50 | 50 | raise template.TemplateSyntaxError, "Error in {% restructuredtext %} filter: The Python docutils library isn't installed." |
51 | | return mark_safe(value) |
| 51 | return value |
52 | 52 | else: |
53 | 53 | docutils_settings = getattr(settings, "RESTRUCTUREDTEXT_FILTER_SETTINGS", {}) |
54 | 54 | parts = publish_parts(source=value, writer_name="html4css1", settings_overrides=docutils_settings) |
diff --git a/django/utils/safestring.py b/django/utils/safestring.py
index eac37c6..8cac661 100644
a
|
b
|
class SafeString(str, SafeData):
|
37 | 37 | if isinstance(rhs, SafeUnicode): |
38 | 38 | return SafeUnicode(self + rhs) |
39 | 39 | elif isinstance(rhs, SafeString): |
40 | | return SafeString(self, rhs) |
| 40 | return SafeString(self + rhs) |
41 | 41 | else: |
42 | 42 | return super(SafeString, self).__add__(rhs) |
43 | 43 | |