summaryrefslogtreecommitdiff
path: root/lib/exe/ajax.php
diff options
context:
space:
mode:
authorAdrian Lang <lang@cosmocode.de>2010-09-22 16:29:25 +0200
committerAdrian Lang <lang@cosmocode.de>2010-09-22 16:36:18 +0200
commit42de51b18d302d07e109c24dfb0ae237e6d38643 (patch)
tree337964c975fca1039e3b7bb8698314c53a267876 /lib/exe/ajax.php
parent17566ac6f3581704c5238c433234ecfb7b0d98f2 (diff)
downloadrpg-42de51b18d302d07e109c24dfb0ae237e6d38643.tar.gz
rpg-42de51b18d302d07e109c24dfb0ae237e6d38643.tar.bz2
Work around WebKit bug: newlines at the end of input values are removed.
In WebKit, newlines at the end of input field’s value parameters are removed. This breaks $PRE, so we protect those new lines with a dot and later remove the dot.
Diffstat (limited to 'lib/exe/ajax.php')
-rw-r--r--lib/exe/ajax.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php
index 533b8f91c..e9c59ca5d 100644
--- a/lib/exe/ajax.php
+++ b/lib/exe/ajax.php
@@ -136,7 +136,7 @@ function ajax_lock(){
if(!$client) $client = clientIP(true);
$draft = array('id' => $id,
- 'prefix' => $_POST['prefix'],
+ 'prefix' => substr($_POST['prefix'], 0, -1),
'text' => $_POST['wikitext'],
'suffix' => $_POST['suffix'],
'date' => (int) $_POST['date'],