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

        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.
        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.

          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