From bbe1c5fb6a44de0715e7f70c27f7cb1149ea2376 Mon Sep 17 00:00:00 2001 From: danieldia Date: Thu, 17 Oct 2013 16:05:04 +1300 Subject: [PATCH] FIX: Ensured that the data-add-url single quotes are not processed by join_links Due to the fact that the last bracket meant that join_links was actually sent URL + ' (eg; http://myurl.com' ), this caused problems when the quote was getting escaped - and actually prevented users from adding form fields in the CMS, with a 500. This fix ensures the closing quote is not processed by join_links. --- code/formfields/FieldEditor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/formfields/FieldEditor.php b/code/formfields/FieldEditor.php index 503ad2f..cf20545 100755 --- a/code/formfields/FieldEditor.php +++ b/code/formfields/FieldEditor.php @@ -19,7 +19,7 @@ class FieldEditor extends FormField { * @return String */ public function FieldHolder($properties = array()) { - $this->setAttribute('data-add-url', '\''.Controller::join_links($this->Link('addfield').'\'')); + $this->setAttribute('data-add-url', '\''.Controller::join_links($this->Link('addfield')).'\''); return $this->renderWith("FieldEditor"); }