You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by "Ulf Dittmer (Jira)" <ji...@apache.org> on 2020/06/29 07:36:00 UTC

[jira] [Created] (JSPWIKI-1130) Preview doesn't handle embedded JavaScript correctly

Ulf Dittmer created JSPWIKI-1130:
------------------------------------

             Summary: Preview doesn't handle embedded JavaScript correctly
                 Key: JSPWIKI-1130
                 URL: https://issues.apache.org/jira/browse/JSPWIKI-1130
             Project: JSPWiki
          Issue Type: Bug
          Components: Editors
    Affects Versions: 2.11.0-M6
            Reporter: Ulf Dittmer


If "jspwiki.translatorReader.allowHTML = true", JavaScript can be inserted into a page and executed like this:

[{If page='SandBox' exists='true'

<script language="javascript">document.writeln("<b>User Agent: </b>" + navigator.userAgent);</script>}]

However, if preview is turned on during editing, executing the JavaScript interferes with the editor, replacing the editor page with the output of the code execution. I'm not sure whether it's possible to fix this while still trying to execute JavaScript. If not, disabling JavaScript during preview seems fine.

[https://jspwiki-wiki.apache.org/Wiki.jsp?page=TESTEST] also shows this.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)