File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
Spixi/Resources/Raw/html/js Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -495,15 +495,15 @@ function linkify(text) {
495495}
496496
497497function visitLink ( url ) {
498- location . href = "ixian:openLink:" + escapeParameter ( url ) ;
498+ location . href = "ixian:openLink:" + url ;
499499 hideModalDialog ( ) ;
500500}
501501
502502function onExternalLink ( e , url ) {
503503 var title = SL_Modals [ "externalLinkTitle" ] ;
504504 var body = SL_Modals [ "externalLinkBody" ] ;
505505 body = body . replace ( "{0}" , "<b>" + url + "</b>" ) ;
506- var visitButtonHtml = "<div onclick=\"visitLink('" + url + "');\">" + SL_Modals [ "externalLinkButtonVisit" ] + "</div>" ;
506+ var visitButtonHtml = "<div onclick=\"visitLink('" + escapeParameter ( url ) + "');\">" + SL_Modals [ "externalLinkButtonVisit" ] + "</div>" ;
507507 var cancelBtnHtml = "<div onclick='hideModalDialog();'>" + SL_Modals [ "cancel" ] + "</div>" ;
508508 showModalDialog ( title , body , cancelBtnHtml , visitButtonHtml ) ;
509509 e . stopPropagation ( ) ;
Original file line number Diff line number Diff line change @@ -34,19 +34,20 @@ function executeUiCommand(cmd) {
3434function unescapeParameter ( str ) {
3535 return str . replace ( / & g t ; / g, ">" )
3636 . replace ( / & l t ; / g, "<" )
37- . replace ( / & # 9 2 ; / g, "\\" )
38- . replace ( / & # 3 9 ; / g, "'" )
39- . replace ( / & # 3 4 ; / g, "\"" )
37+ . replace ( / & b s o l ; / g, "\\" )
38+ . replace ( / & a p o s ; / g, "'" )
39+ . replace ( / & q u o t ; / g, "\"" )
4040 . replace ( / & a m p ; / g, "&" ) ;
4141}
4242
4343function escapeParameter ( str ) {
4444 return str
4545 . replace ( / & (? ! # \d + ; | # x [ \d a - f A - F ] + ; ) / g, "&" )
46- . replace ( / < / g, "<" )
47- . replace ( / > / g, ">" )
4846 . replace ( / " / g, """ )
49- . replace ( / ' / g, "'" ) ;
47+ . replace ( / ' / g, "'" )
48+ . replace ( / \\ / g, "\" )
49+ . replace ( / < / g, "<" )
50+ . replace ( / > / g, ">" ) ;
5051}
5152
5253function quickScanJS ( ) {
You can’t perform that action at this time.
0 commit comments