Priority: Low
Current State: Waiting for Feedback
Released In: n/a
Target Release: n/a
Using the
DpSyntaxHighlighterPlugin inside of an Formquery SHOWQUERY Loop prints after every loop Element an "<script type=" and causes an Brush not found popup.
1 define service{
2 use uplink
3 hosts
4 service_description PortStatus Gi 1
5 servicegroups uplink
6 check_command check_ifup!10101
7 }
<script type=
The Error is caused from the $out print build in Line 115 of the
DpSyntaxHighlighterPlugin.pm adding some additional Backslashes solves the Problem for me.
*** /root/dev/DpSyntaxHighlighterPlugin.pm Wed Dec 2 17:07:38 2009
--- DpSyntaxHighlighterPlugin.pm Wed Dec 2 17:47:48 2009
***************
*** 112,118 ****
return "<span class='foswikiAlert'>$pluginName error: The language \"$lang\" is not supported.</span>"
if $brush eq '';
! $out .= "<script type=\"text/javascript\" src='$rootDir/scripts/shBrush$brush.js'></script>";
_doHead();
--- 112,118 ----
return "<span class='foswikiAlert'>$pluginName error: The language \"$lang\" is not supported.</span>"
if $brush eq '';
! $out .= "<script type=\\\"text/javascript\\\" src='$rootDir/scripts/shBrush$brush.js'></script>";
_doHead();
--
JensDienst - 02 Dec 2009
An addition: using this workaround breaks the Plugin outside an SHOWQUERY Loop
--
JensDienst - 02 Dec 2009
you may want to try
'
instead of
"
(escaped or not).
--
WillNorris - 02 Dec 2009
OK, changing this
$out .= "<script type=\"text/javascript\" src='$rootDir/scripts/shBrush$brush.js'></script>";
to this
$out .= "<script type=\'text/javascript\' src='$rootDir/scripts/shBrush$brush.js'></script>";
solves the Problem.
--
JensDienst - 10 Dec 2009
Perhaps this plugin can implement a similar solution to
EscapeQuotesOptionInICON, once that has been discussed.
--
AndrewJones - 06 Jan 2010
Please try again with the latest version 3.0
--
MichaelDaum - 04 Dec 2014