#10326 closed defect (bug) (fixed)
strip_shortcodes() greedily strips surrounding bytes
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.9 | Priority: | high |
Severity: | critical | Version: | 2.8 |
Component: | Shortcodes | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
strip_shortcodes()
which is run on excerpts is too greedy.
Input:
before[gallery]after
Output:
beforfter
As you can see, the characters immediately preceding and following the shortcode have been stripped out. These characters should be preserved.
Attachments (1)
Change History (7)
#1
@
16 years ago
- Keywords has-patch needs-testing added
- Owner set to markjaquith
- Status changed from new to accepted
#4
@
15 years ago
I've added test cases for this to wordpress-tests
http://svn.automattic.com/wordpress-tests/wp-testcase/test_shortcode.php
Note: See
TracTickets for help on using
tickets.
Patch uploaded. Return the 1st and 6th matches, like do_shortcode_tag() does. Works for me. Can I get someone to verify?