From d60779e85f3ad92722aced6a5fa95b118a54565e Mon Sep 17 00:00:00 2001
From: JediKev <kevin@enhancesoft.com>
Date: Thu, 11 Jan 2018 13:49:35 -0600
Subject: [PATCH] issue: Section Break Hint

This addresses an issue where the Help Text for Section Break fields does
not display custom Redactor styling correctly. Instead of displaying the
properly formatted Redactor content with it's styling it displays the
entire html for the Redactor content. This was due to the format method
used for the Section Break Field's Help Text. This updates the method from
`Format::htmlchars()` to `Format::display()` which displays the properly
formatted content. The content is also sanitized by `Format::sanitize()`
before saving to the database to avoid any chance of XSS.
---
 include/class.forms.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/class.forms.php b/include/class.forms.php
index 062bcaea5..a1d7a331d 100644
--- a/include/class.forms.php
+++ b/include/class.forms.php
@@ -3803,7 +3803,7 @@ class SectionBreakWidget extends Widget {
     function render($options=array()) {
         ?><div class="form-header section-break"><h3><?php
         echo Format::htmlchars($this->field->getLocal('label'));
-        ?></h3><em><?php echo Format::htmlchars($this->field->getLocal('hint'));
+        ?></h3><em><?php echo Format::display($this->field->getLocal('hint'));
         ?></em></div>
         <?php
     }
-- 
GitLab