Ticket #2359: auto.patch
| File auto.patch, 2.0 kB (added by smurf@smurf.noris.de, 1 year ago) |
|---|
-
a/django/contrib/markup/templatetags/markup.py
old new 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 … … 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 … … 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) -
a/django/utils/safestring.py
old new 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
