Opened 13 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)

documentation.diff (792 bytes ) - added by jerry 13 years ago.
updates fix_ampersands documentation to note its behavior when entities or entity-like characters already exist in the text.
16071.fixampersands-doc.diff (829 bytes ) - added by Julien Phalip 13 years ago.
16071.fixampersands-doc.2.diff (838 bytes ) - added by Julien Phalip 13 years ago.
Fixed typo

Download all attachments as: .zip

Change History (7)

by jerry, 13 years ago

Attachment: documentation.diff added

updates fix_ampersands documentation to note its behavior when entities or entity-like characters already exist in the text.

comment:1 by Dougal Matthews, 13 years ago

Easy pickings: set
Triage Stage: UnreviewedAccepted

comment:2 by Dougal Matthews, 13 years ago

Type: UncategorizedCleanup/optimization

by Julien Phalip, 13 years ago

comment:3 by Julien Phalip, 13 years ago

Triage Stage: AcceptedReady for checkin
UI/UX: unset

Thanks, this is good to go. I've just made some minor edits.

by Julien Phalip, 13 years ago

Fixed typo

comment:4 by Jannis Leidel, 13 years ago

Resolution: fixed
Status: newclosed

In [16431]:

(The changeset message doesn't reference this ticket)

Note: See TracTickets for help on using tickets.
Back to Top