MCPcopy
hub / github.com/django/django / avoid_wrapping

Function avoid_wrapping

django/utils/html.py:508–513  ·  view source on GitHub ↗

Avoid text wrapping in the middle of a phrase by adding non-breaking spaces where there previously were normal spaces.

(value)

Source from the content-addressed store, hash-verified

506
507
508def avoid_wrapping(value):
509 """
510 Avoid text wrapping in the middle of a phrase by adding non-breaking
511 spaces where there previously were normal spaces.
512 """
513 return value.replace(" ", "\xa0")
514
515
516def html_safe(klass):

Callers 2

timesinceFunction · 0.90
filesizeformatFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected