Bläddra i källkod

we need to encode the message so it won't interfere with
the <input> tag

Thijs Kinkhorst 19 år sedan
förälder
incheckning
0182206534
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      plugins/translate/functions.php

+ 2 - 2
plugins/translate/functions.php

@@ -466,7 +466,7 @@ function translate_form_babelfish($message) {
     <input type="hidden" name="doit" value="done" />
     <input type="hidden" name="intl" value="1" />
     <input type="hidden" name="tt" value="urltext" />
-    <input type="hidden" name="trtext" value="<?php echo $message; ?>" />
+    <input type="hidden" name="trtext" value="<?php echo htmlspecialchars($message); ?>" />
     <select name="lp"><?php
         echo translate_lang_opt('zh_CN',  '',     'zh_en',
                             sprintf( _("%s to %s"),_("Chinese, Simplified"),_("English"))) .
@@ -928,4 +928,4 @@ function translate_form_google($message) {
 
     translate_table_end();
 }
-?>
+?>