fixed help popups

This commit is contained in:
Roland Gruber 2013-04-13 15:55:54 +00:00
parent 8b4dc54340
commit c86878e90f
1 changed files with 4 additions and 2 deletions

View File

@ -651,8 +651,10 @@ function printHelpLink($entry, $number, $module='', $scope='') {
$message .= '<br><br><hr class="dotted">' . _('Technical name') . ': <i>' . $entry['attr'] . '</i>'; $message .= '<br><br><hr class="dotted">' . _('Technical name') . ': <i>' . $entry['attr'] . '</i>';
} }
// replace special characters // replace special characters
$message = str_replace(array("'", '"', "\n"), array("\\'", '&quot;', ''), $message); $message = preg_replace('/[\\\\]{2}/', '&#92;&#92;&#92;&#92;', $message);
$title = str_replace(array("'", '"', "\n"), array("\\'", '&quot;', ''), $title); $title = preg_replace('/[\\\\]{2}/', '&#92;&#92;&#92;&#92;', $title);
$message = str_replace(array('\\', "'", '"', "\n"), array('\\\\', "\\'", '&quot;', ''), $message);
$title = str_replace(array('\\', "'", '"', "\n"), array('\\\\', "\\'", '&quot;', ''), $title);
echo "<a class=\"margin2\" href=\"" . $helpPath . "help.php?module=$module&amp;HelpNumber=". $number . "&amp;scope=" . $scope . "\" "; echo "<a class=\"margin2\" href=\"" . $helpPath . "help.php?module=$module&amp;HelpNumber=". $number . "&amp;scope=" . $scope . "\" ";
echo "target=\"help\" "; echo "target=\"help\" ";
echo "onmouseover=\"Tip('" . $message . "', TITLE, '" . $title . "')\" onmouseout=\"UnTip()\">"; echo "onmouseover=\"Tip('" . $message . "', TITLE, '" . $title . "')\" onmouseout=\"UnTip()\">";