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

       Web browser: ---
             Bug #: 31830
           Summary: Function `#info': Rewritten with Validator; Parameter
                    `escape' added.
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Unprioritized
         Component: Semantic MediaWiki
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified


Created attachment 9255
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=9255
Patch: New #info implementation.

I rewrote SMW function `#info':

1. Extension Validator is used.

2. Parameter `escape' is introduced.

By default `escape' is true (for backward compatibility):

{{ #info: © me }} 

produces exact result "© me".

If `escape' is false, it allows HTML entities to be decoded:

{{ #info: © me | escape = no }}

produces "© me" (with non-breaking space between © and me). It also allows
color and font formatting:

{{ #info: <span class="error">Bang!</span> | escape = no }}

"Bang!" will be rendered in red color (because "error" class in defined in
MediaWiki).

Frankly, I think escaping should be off by default, I made it on only in sake
of backward compatibility.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to