Message47387
Logged In: YES
user_id=21627
Please use unified or context diffs when submitting patches.
The patch is incorrect: Instead of hard-coding the list of
known entities, sgmllib should use self.entitydefs to
determine the set of entity names that are supported. As a
result, the algorithm should also replace, say, รค if it
occurs in an HTML attribute.
Then the question is what should happen on unknown entity
references. One cannot really call unknown_entityref, since
implementations of that will expect that the entity
reference was in content, not in an attribute. So it would
probably best to leave unknown entity references alone.
Notice that in SGML (and HTML) the semicolon after the
entity name is not mandatory, but can be omitted if the
entity name is not followed by a letter or digit. So you
probably should use the regular expression entityref to find
references.
Please also provide a documentation patch that explains
precisely how the attribute value is created from what is in
the input document (i.e. some entity references replaced, no
character references replaced, etc).
|
|
| Date |
User |
Action |
Args |
| 2007-08-23 15:40:56 | admin | link | issue1087808 messages |
| 2007-08-23 15:40:56 | admin | create | |
|