Page MenuHomePhabricator

Parsoid: Escape plaintext three-tildes ~~~ are expanded to signature unexpectedly
Closed, ResolvedPublic


If I input ~~~, it's converted to my signature. If I input <nowiki>~~~</nowiki>, the nowiki tag is escaped and wrapped and ~~~ is still PST'ed.

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:30 AM
bzimport set Reference to bz37841.

Mass-moving items into VisualEditor product

Not sure this isn't intended behaviour. Roan?

Tweaking summary so it's clear this is about how multiple-tilde strings are handled on save.

Actually a Parsoid issue, moving.

We don't recognize tildes in the tokenizer yet, which would also be the reason why they are not yet escaped. Tildes are already included in syntactic stops used by urltext, but there is no production actually matching them. Should be relatively easy to add.

For regular Wikitext->HTML parsing, those tildes need to be converted back to plain text however (essentially ignored), as they are normally only processed in a pre-save transform.

An alternative (and arguably simpler) solution would be a simple regexp-based escape rule in escapeWikitext.