Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #16071 -- Added note to fix_ampersands documentation about its …

…limitations. Many thanks to jerry and Julien Phalip.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16431 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f8a3d87a199a54305a0f50e24a00fa253fa43766 1 parent 2a122be
Jannis Leidel authored June 17, 2011

Showing 1 changed file with 8 additions and 0 deletions. Show diff stats Hide diff stats

  1. 8  docs/ref/templates/builtins.txt
8  docs/ref/templates/builtins.txt
@@ -1510,6 +1510,14 @@ For example::
1510 1510
 
1511 1511
 If ``value`` is ``Tom & Jerry``, the output will be ``Tom & Jerry``.
1512 1512
 
  1513
+However, ampersands used in named entities and numeric character references
  1514
+will not be replaced. For example, if ``value`` is ``Café``, the output
  1515
+will *not* be ``Caf&eacute&`` but remain ``Café``. This means that
  1516
+in some edge cases, such as acronyms followed by semicolons, this filter will
  1517
+not replace ampersands that need replacing. For example, if ``value`` is
  1518
+``Contact the R&D;``, the output will remain unchanged because ``&D;``
  1519
+resembles a named entity.
  1520
+
1513 1521
 .. templatefilter:: floatformat
1514 1522
 
1515 1523
 floatformat

0 notes on commit f8a3d87

Please sign in to comment.
Something went wrong with that request. Please try again.