ICEfaces
  1. ICEfaces
  2. ICE-9160

JavascriptRunner alert with \n

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.2.0.GA
    • Fix Version/s: EE-3.3.0.GA, 4.0.BETA, 4.0
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      JBoss EAP6
    • Assignee Priority:
      P1

      Description

      I am sending warnings to the the user via an alert sent with JavaScriptRunner:

      JavaScriptRunner.runScript(FacesContext.getCurrentInstance(), "alert('" +
                         warningString.toString() + "');");

      This works, except for when I add a line break '\n' to the alert text. When I do that I don't see the alert and get a js error in the browser (this is the Chrome output):

      [window] Error [status: malformedXML code: 200]: Unexpected token ILLEGAL bridge.uncompressed.js.jsf:1310
      ConsoleLogHandler.errorPrimitive

        Activity

        Brad Kroeger created issue -
        Brad Kroeger made changes -
        Field Original Value New Value
        Assignee Ken Fyten [ ken.fyten ]
        Ken Fyten made changes -
        Assignee Ken Fyten [ ken.fyten ] Mircea Toma [ mircea.toma ]
        Fix Version/s EE-3.3.0.GA [ 10572 ]
        Fix Version/s 3.4 [ 10770 ]
        Assignee Priority P1 [ 10010 ]
        Hide
        Mircea Toma added a comment - - edited

        JavascriptRunner escapes now Javascript special characters before sending them to the bridge

        Show
        Mircea Toma added a comment - - edited JavascriptRunner escapes now Javascript special characters before sending them to the bridge
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #34462 Thu Apr 18 16:37:01 MDT 2013 mircea.toma ICE-9160 Escape Javascript special characters before sending them to the bridge.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/licenses/NOTICE.txt
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/util/JavaScriptRunner.java
        Ken Fyten made changes -
        Link This issue blocks ICE-9202 [ ICE-9202 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #34472 Fri Apr 19 13:31:28 MDT 2013 ken.fyten ICE-9160 - Revert commit for 'Escape Javascript special characters before sending them to the bridge' due to new regressions.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/util/JavaScriptRunner.java
        Hide
        Ken Fyten added a comment -

        Re-opened due to general runtime failures.

        Reverted commit changes for JavaScriptRunner.java on trunk for now to restore general functioning.

        [13:31:28] - svn commit -m "ICE-9160 - Revert commit for 'Escape Javascript special characters before sending them to the bridge' due to new regressions." 1 packet
        [13:31:28] - Sending /svn/icefaces3-trunk/icefaces/core/src/main/java/org/icefaces/util/JavaScriptRunner.java
        [13:31:29] - Committed revision 34472.

        Show
        Ken Fyten added a comment - Re-opened due to general runtime failures. Reverted commit changes for JavaScriptRunner.java on trunk for now to restore general functioning. [13:31:28] - svn commit -m " ICE-9160 - Revert commit for 'Escape Javascript special characters before sending them to the bridge' due to new regressions." 1 packet [13:31:28] - Sending /svn/icefaces3-trunk/icefaces/core/src/main/java/org/icefaces/util/JavaScriptRunner.java [13:31:29] - Committed revision 34472.
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #34490 Mon Apr 22 05:59:03 MDT 2013 mircea.toma ICE-9160 Escape only test formatting caracters.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/licenses/NOTICE.txt
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/util/JavaScriptRunner.java
        Hide
        Mircea Toma added a comment -

        Escaping now only text formatting characters: \n, \t , \r, \b, \f.

        Show
        Mircea Toma added a comment - Escaping now only text formatting characters: \n, \t , \r, \b, \f.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 11382 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Brad Kroeger
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: