Page MenuHomePhabricator

Please provide an "unstrip" function
Closed, ResolvedPublic


Author: yperret

I call a template with a parameter protected by a <nowiki> tag:
When reading this argument from the underlying module the string library seems to hardly handle it.
If I just return it it woks fine. But if I try to manipulate the string it don't work (at least not as expected).

For example:
pframe = frame:getParent() ; args = pframe.args ; local txt = args[1]
Calling string.len(txt) returns 44 whatever the real parameter content, and it is the length of the "magic tag" for the nowiki, which I found by performing:
string.gsub(txt, "\127", "_")
which gives

string library acts like if the string ends at the end of the protected ("magic") <nowiki> part. And this prevent to analyse the effective content of the parameter.

Any way to have a "raw" access to the string content?


Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:33 AM
bzimport added a project: Scribunto.
bzimport set Reference to bz45085.

Merged. Note this will most likely be deployed along with 1.22wmf1, see for the schedule.

Change 95393 had a related patch set uploaded by MarkAHershberger:
Add text module

Change 95393 merged by MarkAHershberger:
Add text module

No open patches to review here (backport patch to REL_1_21 got merged), hence resetting status to RESOLVED FIXED. Backport_to_Stable flag might be set to "+" by hexmode.

Restricted Application added a subscriber: jeblad. · View Herald TranscriptOct 16 2020, 5:43 PM