Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-12839

Add an escape tool for escaping parameters to pass to wiki macros

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 7.3
    • Fix Version/s: None
    • Component/s: Rendering
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      For cases like the one described in issue XWIKI-9798 , it would be ideal to have an escape tool that would prepare a string for being safely used as a wiki macro parameter (escaping all types of quotes, escaping the escape character, etc)

      One special case (because it's very frequent) is when the parameter values are document / space names: since no characters are forbidden in the document / space names, and since there are a lot of macros that are using document names / fullnames as parameters, it would be useful to have a standard method to handle that, instead of each developer handling it with regular expressions.

      Note that this tool is directed to scripting users (developers), not to regular users that only create content (even if using the wiki syntax). Content creators will use hardcoded parameter values and so they should handle the escaping manually.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                lucaa Anca Luca
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: