Merge branch '4'

This commit is contained in:
Robbie Averill 2017-09-26 11:30:56 +13:00
commit c6ad8648fd
2 changed files with 4 additions and 2 deletions

View File

@ -110,9 +110,11 @@ class UserDefinedFormController extends PageController
if ($this->Content && $form = $this->Form()) {
$hasLocation = stristr($this->Content, '$UserDefinedForm');
if ($hasLocation) {
/** @see Requirements_Backend::escapeReplacement */
$formEscapedForRegex = addcslashes($form->forTemplate(), '\\$');
$content = preg_replace(
'/(<p[^>]*>)?\\$UserDefinedForm(<\\/p>)?/i',
$form->forTemplate(),
$formEscapedForRegex,
$this->Content
);
return [

View File

@ -3,7 +3,7 @@
<div class="$Class">
<input id="$ID" class="checkbox" name="$Name" type="checkbox" value="$Value.ATT"<% if $isChecked %>
checked="checked"<% end_if %><% if $isDisabled %> disabled="disabled"<% end_if %> />
<label for="$ID">$Title</label>
<label for="$ID">$Title.XML</label>
</div>
<% end_loop %>
<% else %>