Page MenuHomePhabricator

[Edittools] Plus sign ("+") broken
Closed, ResolvedPublic

Description

With the following in MediaWiki:Edittools:

<charinsert> € £ ¥ $ ¢ © ® ™ </charinsert> ·
<charinsert> « + » {{+}} </charinsert>
<charinsert> — – ‘ “ ’ ” | … ~ # @ § ¶ • ¡ ¿ \ </charinsert>

I get the following HTML output (see second line) on all edit pages:

<a onclick="insertTags(&#39;«&#39;,&#39;&#39;,&#39;&#39;);return false" href="#">«</a>
<a onclick="insertTags(&#39;&#39;,&#39;&#39;,&#39;&#39;);return false" href="#" />
<a onclick="insertTags(&#39;»&#39;,&#39;&#39;,&#39;&#39;);return false" href="#">»</a>

Which triggers the following DOM error in WebKit:

  • XML self-closing tag syntax used on <a>. The tag will not be closed.

And in the end result, it doesn't work. (unclickable ofcourse).

The HTML output when viewing the message-page is slightly different:

<a onclick="insertTags('«','','');return false" href="#">«</a>
<a onclick="insertTags('','','');return false" href="#"></a>
<a onclick="insertTags('»','','');return false" href="#">»</a>


Version: unspecified
Severity: major

Details

Reference
bz28800

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:32 PM
bzimport added a project: CharInsert.
bzimport set Reference to bz28800.

As an aside, the code on sq probably meant to do:

<charinsert>«+» {{+}}</charinsert>

Which causes « before the cursor and » after the cursor when you insert (or surround text if highlighted), since most keyboards have a + key, while « and » are more rare.