https://bugzilla.wikimedia.org/show_bug.cgi?id=45085

       Web browser: ---
            Bug ID: 45085
           Summary: problem with string lib for args that contains some
                    tags
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Scribunto
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---

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,

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to