Glossary replaces parts of HTML entities that match a glossary term

bdeclerc - June 13, 2007 - 12:57
Project:Glossary
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:NancyDru
Status:duplicate
Description

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 ;

AttachmentSize
glossary-htmlentities.patch1.95 KB

#1

NancyDru - November 30, 2007 - 16:43
Assigned to:Anonymous» NancyDru
Status:active» duplicate

http://drupal.org/node/7261

 
 

Drupal is a registered trademark of Dries Buytaert.