Opened 11 years ago
Closed 11 years ago
#34191 closed defect (bug) (fixed)
Shortcode JS Missed in r33118
| Reported by: | miqrogroove | Owned by: | johnbillion |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4 |
| Component: | Shortcodes | Version: | 4.3 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | javascript |
Description
The shortcode attribute parser in Javascript no longer matches the PHP code.
Attachments (2)
Change History (11)
#4
@
11 years ago
The new test in 34191.2.patch passes for me. If I revert shortcode.js only, the new test fails as expected. Looks good to me.
Do we need to add this kind of test for the main regex as well?
#6
@
11 years ago
- Keywords fixed-major added; has-patch needs-testing removed
- Resolution fixed
- Status closed → reopened
#7
@
11 years ago
@miqrogroove Per discussion about adding documentation, shortcode.js (I believe) is used exclusively by mce views https://core.trac.wordpress.org/browser/tags/4.3/src/wp-includes/js/mce-view.js#L670.
I'm not sure how this would be best documented. Comment at the top of the file?
#8
@
11 years ago
There are some existing shortcode parsing tests: https://core.trac.wordpress.org/browser/trunk/tests/qunit/wp-includes/js/shortcode.js
I'll update them to cover more cases.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
34191.2.patch abstracts the regex into a function so it can be unit tested to ensure the JS and PHP versions remain consistent.