[ 
https://issues.apache.org/jira/browse/JSPWIKI-1130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18138343#comment-18138343
 ] 

ASF subversion and git services commented on JSPWIKI-1130:
----------------------------------------------------------

Commit 47a7ef739b8158d772a62d64871c4be175c572f7 in jspwiki's branch 
refs/heads/master from Arturo Bernal
[ https://gitbox.apache.org/repos/asf?p=jspwiki.git;h=47a7ef739 ]

JSPWIKI-1130 Do not run the scripts of the page in the preview of the editor

The preview is loaded with Request.HTML, which runs the scripts of the response 
by
default. With jspwiki.translatorReader.allowHTML=true a script that calls
document.writeln replaced the whole editor page once the preview arrived. The 
preview
is now loaded with evalScripts set to false.


> 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
>            Priority: Minor
>              Labels: pull-request-available
>
> 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
(v10.3.26#10030026)

Reply via email to