Last modified: 2014-07-04 15:13:15 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 T56577, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54577 - VisualEditor: Rendering of <source> MWExtensionNode is empty after the user edits it
VisualEditor: Rendering of <source> MWExtensionNode is empty after the user e...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
ContentEditable (Other open bugs)
unspecified
All All
: High normal
: VE-deploy-2013-12-05
Assigned To: Ed Sanders
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-24 23:41 UTC by Roan Kattouw
Modified: 2014-07-04 15:13 UTC (History)
4 users (show)

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


Attachments

Description Roan Kattouw 2013-09-24 23:41:15 UTC
1. Create a page with <source lang="JavaScript">some content here</source>
2. Edit the page in VE. Note that the <source> tag renders correctly
3. Use the alien tag inspector to edit the contents of the <source> tag
4. The <source> tag rerenders as an empty block

This is because the HTML <source> tag is self-closing and cannot have any content. This leads to strange situations like:

>>> extensionNode[0]
<source lang=​"JavaScript">​whee​</source>​
>>> extensionNode[0].outerHTML
"<source lang="JavaScript"></source>"

To avoid the HTML behavior for this and possibly other tag names, we should create an XML node rather than an HTML node to build the wikitext string for the preview.
Comment 1 Gerrit Notification Bot 2013-12-01 17:31:55 UTC
Change 98392 had a related patch set uploaded by Esanders:
Render MW extension node wikitext with XML

https://gerrit.wikimedia.org/r/98392
Comment 2 Gerrit Notification Bot 2013-12-01 19:06:32 UTC
Change 98392 merged by jenkins-bot:
Render MW extension node wikitext with XML

https://gerrit.wikimedia.org/r/98392

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


Navigation
Links