Description
Recently I ran into an issue where HTML tags were appearing in the content displayed to the user when using a rich text editor plugin such as CKEditor and having the text format type set to "Full HTML".
After some debugging I found out that the issue was due to the check_markup() function being used when adding the content to $output in includes/biblio_theme.inc:162:164
My solution was to pass "full_html" argument to the check_markup() function so that it was use the text format that I wanted. However, this begged the question of whether or not check_markup() should be used at all if it's interfering with Drupal's own content filtering/formatting. I do not know the original intention of this field. Maybe there was a reason for doing this. I'm interested in hearing people's thoughts on this issue.
Thanks.
Referenced Module Code without changes in biblio/includes/biblio_theme.inc
161 if ($node->biblio_abst_e)
162 $output .= '<h3>' . t("Abstract") . ':</h3> ' . check_markup($node->biblio_abst_e) . "\n";
163 if ($node->biblio_abst_f)
164 $output .= '<p>' . check_markup($node->biblio_abst_f) . "\n";
Referenced Module Code with fix in biblio/includes/biblio_theme.inc
161 if ($node->biblio_abst_e)
162 $output .= '<h3>' . t("Abstract") . ':</h3> ' . check_markup($node->biblio_abst_e, 'full_html') . "\n";
163 if ($node->biblio_abst_f)
164 $output .= '<p>' . check_markup($node->biblio_abst_f, 'full_html') . "\n";
Comment | File | Size | Author |
---|---|---|---|
#5 | biblio-2851255-5-use-correct-format-for-abstract.patch | 1.71 KB | Alan D. |
Comments
Comment #2
nshelms CreditAttribution: nshelms as a volunteer commentedComment #3
nshelms CreditAttribution: nshelms as a volunteer commentedComment #4
nshelms CreditAttribution: nshelms as a volunteer commentedComment #5
Alan D. CreditAttribution: Alan D. commentedTotally untested patch.
Using full_html would lead to security issues depending on how the format was configured.