Opened 14 years ago
Closed 13 years ago
#16071 closed Cleanup/optimization (fixed)
Update fix_ampersands documentation for behavior with existing entities
Reported by: | Jerry | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.3 |
Severity: | Normal | Keywords: | fix_ampersands filters |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
fix_ampersands doesn’t replace all ampersands with & entities; it attempts, usually successfully, to exclude named entities and numeric character references while converting all ampersands that do need replacing. This (and its behavior in some edge cases, noted at ticket:16066) should be documented.
Adds two lines under fix_ampersands in docs/_build/html/ref/templates/builtins.html:
Named entities and numeric character references are not replaced. If ``value`` is ``Pepé Le Pew``, the output will remain ``Pepé Le Pew``. In some edge cases--such as abbreviations followed by semicolons--this filter will not replace ampersands that need replacing. If ``value`` is ``Darrin, run that past R&D; Betty…``, the output will remain unchanged because ``&D;`` resembles a named entity.
Attachments (3)
Change History (7)
by , 14 years ago
Attachment: | documentation.diff added |
---|
comment:1 by , 14 years ago
Easy pickings: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 14 years ago
Type: | Uncategorized → Cleanup/optimization |
---|
by , 13 years ago
Attachment: | 16071.fixampersands-doc.diff added |
---|
comment:3 by , 13 years ago
Triage Stage: | Accepted → Ready for checkin |
---|---|
UI/UX: | unset |
Thanks, this is good to go. I've just made some minor edits.
comment:4 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
In [16431]:
(The changeset message doesn't reference this ticket)
updates fix_ampersands documentation to note its behavior when entities or entity-like characters already exist in the text.