[buddypress-trac] [BuddyPress] #1660: bp_create_excerpt can split html tags

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Sat Jan 23 18:45:28 UTC 2010

#1660: bp_create_excerpt can split html tags
Reporter:  junsuijin                 |       Owner:  junsuijin
    Type:  defect                    |      Status:  new      
Priority:  major                     |   Milestone:  1.2      
Keywords:  has-patch, needs testing  |  

Comment(by junsuijin):

 bp_create_excerpt.2.patch is updated to remove object support.

 A short explanation of the regex pattern:
 it splits the string on <tag ...>[optional non-space chars]. It also
 splits on the space character(s), similar to what the normal explode would
 do. If it splits on a <tag> with or without a word attached after it
 (<opening tag>word as explained above), it captures that delimiter,
 discarding the surrounding space characters and adding it as another word
 in the array. I have tested this regex extensively on unstripped WordPress
 post excerpts and it has to be formatted in this order to function
 properly. The force_balance_tags function must also be used (it is
 currently added to the bp_create_excerpt filter), because the word limit
 might be hit after <opening tag>word another-word...before the closing tag

Ticket URL: <https://trac.buddypress.org/ticket/1660#comment:2>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list