diff options
| author | Emil Stenstròˆm <em@kth.se> | 2013-05-18 13:58:45 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2013-05-18 23:01:48 +0200 |
| commit | 7d77e9786a118dd95a268872dd9d36664066b96a (patch) | |
| tree | 8680cbbad6c00012a07119027532e897f5a4b022 /django/utils/html.py | |
| parent | caf56ad1743778bad8af6b51b08f5baa342d4cd2 (diff) | |
Fixed #20246 -- Added non-breaking spaces between values an units
Diffstat (limited to 'django/utils/html.py')
| -rw-r--r-- | django/utils/html.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/django/utils/html.py b/django/utils/html.py index 8b28d97d13..edddc48e62 100644 --- a/django/utils/html.py +++ b/django/utils/html.py @@ -281,3 +281,10 @@ def clean_html(text): text = trailing_empty_content_re.sub('', text) return text clean_html = allow_lazy(clean_html, six.text_type) + +def avoid_wrapping(value): + """ + Avoid text wrapping in the middle of a phrase by adding non-breaking + spaces where there previously were normal spaces. + """ + return value.replace(" ", "\xa0") |
