Last modified: 2012-03-13 21:48:22 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 T37173, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35173 - HTML tag matching bugged
HTML tag matching bugged
Status: RESOLVED DUPLICATE of bug 1310
Product: MediaWiki extensions
Classification: Unclassified
Other (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-12 16:59 UTC by Lord_Farin
Modified: 2012-03-13 21:48 UTC (History)
1 user (show)

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


Attachments
How the bug displays (5.22 KB, image/png)
2012-03-12 16:59 UTC, Lord_Farin
Details

Description Lord_Farin 2012-03-12 16:59:20 UTC
Created attachment 10222 [details]
How the bug displays

I have been trying to develop an extension allowing for a more detailed and enhanced transclusion feature, among other things. It involves certain new tags, such as 'section'. I am aware that this tag is already defined in HTML5, but the problem persisted when it was changed to a different name.

Apparently, there is a problem with the detection of nested tags.

To illustrate this, consider the following wikitext (which renders as seen in the attachment):

#start sample
<section title="Test" headerlevel="2" name="testing">This is a test</section>

<section name="name">This is a test
<section name="sub">What should be a subsection</section>
Some further text
</section>
#end sample

As one sees, the parser handles perfectly the case where there is no nesting. But then the second section, containing the subsection, apparently greedily takes the first '/section' tag as its endpoint, while this is obviously not how HTML should be read.

After a whole weekend, I decided to ask help here as I couldn't figure it out myself.

Thanks in advance.
Comment 1 Lord_Farin 2012-03-12 21:34:44 UTC
Having verified the persistence of the bug in various cases, I deem it appropriate to call this a 'new' rather than 'unconfirmed' bug.
Comment 2 Brion Vibber 2012-03-13 21:48:08 UTC
Extension tag hooks cannot be nested (not that parser functions *can* be nested.)

Duping this to classic bug 1310 where there's also some more recent discussion.

*** This bug has been marked as a duplicate of bug 1310 ***
Comment 3 Brion Vibber 2012-03-13 21:48:22 UTC
not that -> note that :P :)

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


Navigation
Links