Opened 6 years ago
Closed 6 years ago
#7923 closed defect (bug) (fixed)
Nouveau - Paragraph elements are escaped for group descriptions
Reported by: | MorgunovVit | Owned by: | imath |
---|---|---|---|
Milestone: | 3.2.0 | Priority: | normal |
Severity: | normal | Version: | 3.0.0 |
Component: | Groups | Keywords: | has-patch commit |
Cc: |
Description
Hi!
I think, that it’s a mistake in file: plugins\buddypress\bp-groups\bp-groups-template.php
Instead
<?php echo esc_html( bp_nouveau_group_meta()->description ); ?>
need to be:
<?php echo wp_specialchars_decode( bp_nouveau_group_meta()->description ); ?>
Because in another way it prints on site page something like this: Screenshot https://prnt.sc/k58j6l
Attachments (2)
Change History (11)
#1
@
6 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 3.2.0
- Summary changed from Bug in plugins\buddypress\bp-groups\bp-groups-template.php to Nouveau - Paragraph elements are escaped for group descriptions
- Version set to 3.0.0
#3
@
6 years ago
- Owner set to imath
- Status changed from new to assigned
Closed duplicate #7961
So this seems to be something very annoying for people using the BP Nouveau template pack. Thanks a lot @dcavins for this first patch, but seeing an unescaped string is giving me headaches ! :)
I'm going to work on this and will submit a new patch asap.
#4
@
6 years ago
- Keywords has-patch reporter-feedback added; needs-patch removed
After looking deeper into this issue. Here is some contextual information :
- One of the concerns of @hnla (correct me if I'm wrong :) ) was to make sure no empty markup was generated by BP Nouveau.
- The Group description has a specific customizer setting where the Admin can choose to display this description within the default Groups front page's body instead of the Group's header.
The 7923.2.patch is taking these two points in account, and directly use the existing core template tag bp_group_description()
instead of the bp_nouveau_group_meta()->description
property that is causing some confusion imho. FYI hnla I also added some style rules to the paragraph because it was weird to have a big empty space before the bottom of the header's group description box.
If @MorgunovVit &/or @dcavins &/or @marcella1981 who reported the bug could test the patch and confirm it's fixing the issue : that would be really great !
#6
@
6 years ago
Hi @imath-
Thanks for updating the patch. Your proposed fix, replacing esc_html( bp_nouveau_group_meta()->description )
with bp_group_description()
, works for me. :)
Remove esc_html() wrapper.