Skip to:

Opened 6 years ago

Closed 6 years ago

#7930 closed defect (bug) (no action required)

Harmonize BP Nouveau Group Header files

Reported by: dcavins's profile dcavins Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0.0
Component: Groups Keywords: 2nd-opinion
Cc: dcavins


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 -->
	<?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.


Attachments (1)

header-desc-esc-example.png (34.8 KB) - added by dcavins 6 years ago.
Example of output.

Download all attachments as: .zip

Change History (3)

6 years ago

Example of output.

#1 @r-a-y
6 years ago

Duplicate of #7923?

#2 @dcavins
6 years ago

  • Milestone 3.2.0 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Thanks, @r-a-y! Closing in favor or earlier ticket.

Note: See TracTickets for help on using tickets.