Uploaded image for project: 'XWiki Rendering'
  1. XWiki Rendering
  2. XRENDERING-554

Leading space is trimmed from input value by the "clean" option of the html macro

    XMLWordPrintable

Details

    • Bug
    • Resolution: Solved By
    • Major
    • None
    • 8.4.4, 10.2, 11.0.3
    • Macro - HTML
    • Unknown
    • N/A
    • N/A

    Description

      For the following wiki syntax (notice the leading space of the value of the hidden input):

      {{html}}
      <form>
        <input type='hidden' value=" abc"/>
      </form>
      {{/html}}
      
      {{html clean='false'}}
      <form>
        <input type='hidden' value=" abc"/>
      </form>
      {{/html}}
      

      The obtained html result is:

      <form>
        <input type="hidden" value="abc" />
      </form><form>
        <input type='hidden' value=" abc"/>
      </form>
      

      Actual result:

      • for the form generated with the html macro without the clean="false" option, the value of the input is just "abc", without the leading space.

      Expected result:

      • I'd expect the cleaning option of the html macro to not alter the values of the inputs, especially as they are (x)html valid.

      Attachments

        Issue Links

          Activity

            People

              surli Simon Urli
              lucaa Anca Luca
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: