escape special chars in missing translation form

This commit is contained in:
Uwe Steinmann 2021-08-20 09:42:27 +02:00
parent a4fb4230e8
commit fd4131497b

View File

@ -245,7 +245,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
echo "<table class=\"table table-condensed\">"; echo "<table class=\"table table-condensed\">";
echo "<tr><th>Key</th><th>engl. Text</th><th>Your translation</th></tr>\n"; echo "<tr><th>Key</th><th>engl. Text</th><th>Your translation</th></tr>\n";
foreach($MISSING_LANG as $key=>$lang) { foreach($MISSING_LANG as $key=>$lang) {
echo "<tr><td>".$key."</td><td>".(isset($LANG['en_GB'][$key]) ? $LANG['en_GB'][$key] : '')."</td><td><div class=\"input-append send-missing-translation\"><input name=\"missing-lang-key\" type=\"hidden\" value=\"".$key."\" /><input name=\"missing-lang-lang\" type=\"hidden\" value=\"".$lang."\" /><input type=\"text\" class=\"input-xxlarge\" name=\"missing-lang-translation\" placeholder=\"Your translation in '".$lang."'\"/><a class=\"btn\">Submit</a></div></td></tr>"; echo "<tr><td>".htmlspecialchars($key)."</td><td>".(isset($LANG['en_GB'][$key]) ? $LANG['en_GB'][$key] : '')."</td><td><div class=\"input-append send-missing-translation\"><input name=\"missing-lang-key\" type=\"hidden\" value=\"".$key."\" /><input name=\"missing-lang-lang\" type=\"hidden\" value=\"".$lang."\" /><input type=\"text\" class=\"input-xxlarge\" name=\"missing-lang-translation\" placeholder=\"Your translation in '".$lang."'\"/><a class=\"btn\">Submit</a></div></td></tr>";
} }
echo "</table>"; echo "</table>";
echo "<div class=\"splash\" data-type=\"error\" data-timeout=\"5500\"><b>There are missing translations on this page!</b><br />Please check the bottom of the page.</div>\n"; echo "<div class=\"splash\" data-type=\"error\" data-timeout=\"5500\"><b>There are missing translations on this page!</b><br />Please check the bottom of the page.</div>\n";