Page MenuHomePhabricator

<nowiki> broken in <charinsert>
Closed, ResolvedPublic

Description

Due to some change in parsing, the <nowiki> tags stopped working inside
<charinsert>. This makes it impossible to use templates (which expand when not
inside <nowiki>), and anything containing + or space (which have a special
meaning inside <charinsert>). This breaks some of the most useful functions of
MediaWiki:Edittools (the insertion of templates and things like <ref name=""/>).

Some examples:

<nowiki>{{</nowiki>SN}} used to result in insertTags('{{SN}}', '', ''), now it
results in insertTags('<nowiki>{{</nowiki>SN}}', '', '').

<ref<nowiki> </nowiki>name="+"<nowiki> </nowiki>/> used to result in
insertTags('<ref name="', '" />', ''), now it results in three separate links
containing insertTags('<ref<nowiki>', '', ''), insertTags('</nowiki>name="',
'"<nowiki>', '') and insertTags('</nowiki>/>', '', '').

Please restore the old parsing or provide some sort of workaround. (An optional
attribute like <charinsert space="1"> suppressing the special meaning of
whitespace would solve half of the problem.)


Version: unspecified
Severity: normal

Details

Reference
bz6203

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:15 PM
bzimport added a project: CharInsert.
bzimport set Reference to bz6203.

A workaround for the template problem is to include everything from another
namespace (templates inside <charinsert> expand in the MediaWiki namespace
only), so only the space problem remains.

It's not "broken", it just doesn't exist. <charinsert> doesn't contain wiki
markup.

It's possible <charinsert> could have it's very own <nowiki> parsing, but
that just seems silly. Anyway, needs to be very carefully checked for security
if added.

Added a pseudo-<nowiki> for <charinsert> in r14584, in which
whitespace is allowed. Other characters appear the same in or
out.