Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 10 years ago

Last modified 3 years ago

#3680 closed defect (bug) (fixed)

buddypress theme doesn’t consider the ”more tag” and showing error

Reported by: walid3's profile walid3 Owned by: boonebgorges's profile boonebgorges
Milestone: 2.3 Priority: normal
Severity: normal Version: 1.5
Component: Core Keywords:
Cc:

Description

I originally posted that as a support topic but as it throw error I thought it's more like a bug so I'm posting it here.

when installed in multisite and set to be aware of news posts, buddypress activity page show it’s own version of excerpt, it show post thumbnail and part of the post, even though set the tag and it’s working normally in twenty eleven blog theme, and also it show error saying ” !–more– ”
look here to understand:

http://imageshack.us/photo/my-images/31/moretag.gif/

Change History (4)

#1 @boonebgorges
13 years ago

  • Keywords reporter-feedback added
  • Milestone changed from Awaiting Review to Future Release

By default, the <!--more--> tag should be stripped, unless you have enabled it with a plugin (arbitrary markup like this is removed).

So, there are really two issues going on here:

  • Something in your theme or plugins is making BP fail at stripping the <!--more--> tag. I've just checked, and BP handles this correctly out of the box
  • BP does not respect WP's <!--more--> tag, and instead creates its own excerpt. Perhaps we should build support for <!--more--> - but this would be an enhancement.

Check to see whether the same issue happens to you when you use the bp-default theme and no interfering plugins.

#3 @boonebgorges
10 years ago

  • Keywords reporter-feedback removed
  • Milestone changed from Future Release to 2.3

#6246 was marked as a duplicate.

The issue is that bp_create_excerpt() is too strict about what counts as an HTML tag. It requires <\w, which is to say that a word-character has to follow the opening bracket; <!-- does not meet this requirement. I'm going to modify the regex so that it allows an exclamation point. This will result in some false positives in odd cases where people are putting miscellaneous stuff in corner brackets - Foo <bar baz> barry - but it's pretty much impossible to validate tags in a reliable way (and to some extent this bug exists already).

#4 @boonebgorges
10 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 9523:

In bp_create_excerpt(), recognize HTML comments when exclude HTML from counts.

This prevents problems with, among other things, the <!--more--> tag in
activity streams.

Fixes #3680.

Note: See TracTickets for help on using tickets.