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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Solved By
    • Affects Version/s: 8.4.4, 10.2, 11.0.3
    • Fix Version/s: None
    • Component/s: Macro - HTML
    • Labels:
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      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

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: