mirror of
https://github.com/django/django.git
synced 2025-10-26 07:06:08 +00:00
Fixed #20246 -- Added non-breaking spaces between values an units
This commit is contained in:
committed by
Claude Paroz
parent
caf56ad174
commit
7d77e9786a
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user