From f29559242f47675c7208f7a339c006aa259cab80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 7 Sep 2010 10:51:27 +0200 Subject: [PATCH] Make non js ENUM editor automatically escape fields. --- enum_editor.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/enum_editor.php b/enum_editor.php index 74ed09a28..1578374a8 100644 --- a/enum_editor.php +++ b/enum_editor.php @@ -22,22 +22,20 @@ require_once './libraries/header_meta_style.inc.php';

', htmlspecialchars($value)); - $stripped_values[] = htmlspecialchars($value); + echo sprintf('', htmlspecialchars(str_replace(array("''", '\\\\', "\\'"), array("'", '\\', "'"), substr($value, 1, -1)))); } } @@ -55,7 +53,7 @@ require_once './libraries/header_meta_style.inc.php'; ?>

- + "> + Restart insertion and add a new value

@@ -68,7 +66,7 @@ require_once './libraries/header_meta_style.inc.php';

Output

Copy and paste the joined values into the "Length/Values" field

- +