[buddypress-trac] [BuddyPress Trac] #7930: Harmonize BP Nouveau Group Header files
buddypress-trac
noreply at wordpress.org
Mon Jul 16 22:16:01 UTC 2018
#7930: Harmonize BP Nouveau Group Header files
--------------------------+-------------------------
Reporter: dcavins | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.2.0
Component: Groups | Version: 3.0.0
Severity: normal | Keywords: 2nd-opinion
--------------------------+-------------------------
The markup for the description in the group header varies between the
cover image version and standard version. The `esc_html()` call in the
cover header version results in `<p>` tags being displayed on the page on
the cover header version.
from group-header.php:
{{{
<?php if ( ! bp_nouveau_groups_front_page_description() ) { ?>
<?php if ( bp_nouveau_group_meta()->description ) {
?>
<div class="group-description">
<?php echo bp_nouveau_group_meta()->description;
?>
</div><!-- //.group_description -->
<?php } ?>
<?php } ?>
}}}
from cover-image-header.php:
{{{
<?php if ( ! bp_nouveau_groups_front_page_description() ) : ?>
<?php if ( ! empty( bp_nouveau_group_meta()->description ) ) : ?>
<div class="desc-wrap">
<div class="group-description">
<?php echo esc_html(
bp_nouveau_group_meta()->description ); ?>
</div><!-- //.group_description -->
</div>
<?php endif; ?>
<?php endif; ?>
}}}
The problem, I think, is that we apply many HTML-generating filters to the
group description, including `wptexturize`, `convert_smilies`, `wpautop`,
`convert_chars` and `make_clickable`, so escaping potential HTML output
seems like it will result in broken output in many common use cases, like
including a link.
Thanks!
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7930>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list