Opened 6 years ago
Closed 6 years ago
#7930 closed defect (bug) (no action required)
Harmonize BP Nouveau Group Header files
Reported by: | dcavins | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0.0 |
Component: | Groups | Keywords: | 2nd-opinion |
Cc: | dcavins |
Description
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!
Example of output.