Last modified: 2013-11-15 11:10:30 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 T47085, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45085 - Please provide an "unstrip" function
Please provide an "unstrip" function
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Scribunto (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Brad Jorsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-16 22:25 UTC by Yannick Perret
Modified: 2013-11-15 11:10 UTC (History)
3 users (show)

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


Attachments

Description Yannick Perret 2013-02-16 22:25:34 UTC
Hello,
I call a template with a parameter protected by a <nowiki> tag:
{{mytemplate|<nowiki>{{stuff}}</nowiki>}}
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
_UNIQ5ed6c7763331d005-nowiki-00000001-QINU_

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?

Regards,
Comment 1 Brad Jorsch 2013-03-05 00:58:33 UTC
Gerrit change I47356215.
Comment 2 Brad Jorsch 2013-03-27 17:10:39 UTC
Merged. Note this will most likely be deployed along with 1.22wmf1, see https://www.mediawiki.org/wiki/MediaWiki_1.22/Roadmap for the schedule.
Comment 3 Gerrit Notification Bot 2013-11-14 15:19:02 UTC
Change 95393 had a related patch set uploaded by MarkAHershberger:
Add text module

https://gerrit.wikimedia.org/r/95393
Comment 4 Gerrit Notification Bot 2013-11-14 15:25:12 UTC
Change 95393 merged by MarkAHershberger:
Add text module

https://gerrit.wikimedia.org/r/95393
Comment 5 Andre Klapper 2013-11-15 11:10:30 UTC
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.

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


Navigation
Links