Sometimes it is necessary to use HTML entities in content, to represent certain symbols. In my concrete case, "lt" is a glossary entry for "Local Time", but this makes it impossible to use the HTML entity for the < symbol, since a glossary link gets appended inside the html entity.

I've written some code which puts the check for HTML entities in the same location as the check for being inside a link and I've attached it here, this is my first patch submission, so please inform me if something's not right (also, it's a patch between two local files, not against the CVS repository, but the original file is a download of the latest 5.x-1.x-dev release)

Essentially, for all glossary items 6 or less characters long, I check to see if they are not preceded by & and succeeded by ; (since glossary allows glossarifying partial words, I check up to 6 characters before and beyond the match. I then assume this is an HTML-entity unless there's a space somewhere between the & and the ;

CommentFileSizeAuthor
glossary-htmlentities.patch1.95 KBbdeclerc

Comments

nancydru’s picture

Assigned: Unassigned » nancydru
Status: Active » Closed (duplicate)