Tapestry
  1. Tapestry
  2. TAPESTRY-2429

Script text added by RenderSupport.addScript() should be added raw (with XML elements not encoded as entities)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.12
    • Fix Version/s: 5.0.14
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      In a component, I am using
      RenderSupport.addScript(str),
      where
      String str = "new tooltip(\"tooltipA\", \"<span
      id='tooltip1'>A tooltip over link<span>\", 10, 20,
      false,0)";

      But at the bottom of the rendered html, < and > are escaped and rendered as
      < and > respectively.

      Maybe RenderSupport.addScript should have an option to render raw text.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        70d 1h 20m 1 Howard M. Lewis Ship 05/Aug/08 22:29
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12568123 ] jira [ 12591213 ]
        Mark Thomas made changes -
        Workflow jira [ 12431954 ] Default workflow, editable Closed status [ 12568123 ]
        Howard M. Lewis Ship made changes -
        Resolution Fixed [ 1 ]
        Fix Version/s 5.0.14 [ 12313214 ]
        Status Open [ 1 ] Closed [ 6 ]
        Howard M. Lewis Ship made changes -
        Issue Type Wish [ 5 ] Bug [ 1 ]
        Priority Minor [ 4 ] Major [ 3 ]
        Summary RenderSupport.addscript should have the option to render raw. Script text added by RenderSupport.addScript() should be added raw (with XML elements not encoded as entities)
        Hide
        Howard M. Lewis Ship added a comment -

        I'm increasingly of the solution that the MarkupWriter should not escape entities inside comments ... that would certainly resolve this problem.

        Show
        Howard M. Lewis Ship added a comment - I'm increasingly of the solution that the MarkupWriter should not escape entities inside comments ... that would certainly resolve this problem.
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Assignee Howard M. Lewis Ship [ hlship ]
        Hide
        Andy Blower added a comment -

        I just ran into this in 5.0.13 as well. I was trying the following:

        renderSupport.addScript("for (int i=1; i <= %d; i++) { ", filterIdx);

        and the for loop is never going to work with the output becoming:

        for (int i=1; i <= 8; i++) {

        For this reason I would say that this is more than minor.

        Show
        Andy Blower added a comment - I just ran into this in 5.0.13 as well. I was trying the following: renderSupport.addScript("for (int i=1; i <= %d; i++) { ", filterIdx); and the for loop is never going to work with the output becoming: for (int i=1; i <= 8; i++) { For this reason I would say that this is more than minor.
        Shing Hing Man created issue -

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Shing Hing Man
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development