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.
This commit is contained in:
danieldia 2013-10-17 16:05:04 +13:00
parent d3e4b8a5e8
commit bbe1c5fb6a

View File

@ -19,7 +19,7 @@ class FieldEditor extends FormField {
* @return String * @return String
*/ */
public function FieldHolder($properties = array()) { 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"); return $this->renderWith("FieldEditor");
} }