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";
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nshelms created an issue. See original summary.

nshelms’s picture

Issue summary: View changes
nshelms’s picture

Issue summary: View changes
nshelms’s picture

Issue summary: View changes
Alan D.’s picture

Title: HTML tags display in abstract field » Abstract fields use the system default format
Category: Support request » Bug report
Status: Active » Needs review
FileSize
1.71 KB

Totally untested patch.

Using full_html would lead to security issues depending on how the format was configured.

Status: Needs review » Needs work