Last modified: 2012-02-11 19:37:52 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T36314, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34314 - parser does not preserve whitespace in tag attributes passed to extensions.
parser does not preserve whitespace in tag attributes passed to extensions.
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.20.x
All All
: Lowest normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-10 02:34 UTC by Lee Worden
Modified: 2012-02-11 19:37 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Lee Worden 2012-02-10 02:34:23 UTC
Here's a real-life example, though it may contain extraneous information:

<project-file filename="deterministic-diffusion.figure.ode-experiment.  0.png" make=yes/>

This call to an extension's tag hook can not be handled correctly by the extension, because the parser's Sanitizer collapses the two spaces in the filename into one.  Strings between double or single quotes should be preserved verbatim as much as possible.
Comment 1 Brion Vibber 2012-02-10 18:44:04 UTC
IIRC this is behaving according to XML spec; multiple literal spaces may be consolidated.

Try explicit &#32; or &#x20; or perhaps you want &nbsp; for a non-breaking space here.



http://www.w3.org/TR/REC-xml/#AVNormalize
"If the attribute type is not CDATA, then the XML processor MUST further process the normalized attribute value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by a single space (#x20) character."

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links