Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#30431 closed defect (bug) (invalid)

wptexturize() breaking shortcode-tags

Reported by: speedpartner's profile speedpartner Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.0.1
Component: Formatting Keywords:
Focuses: Cc:

Description

Since upgrade from 3.9.x to 4.0.1 problems with broken shortcode-tags appeared. Those are because the tags (and their attributes) are run through wptexturize().

shortcode-tag used

[res_map address="someaddress, someplace"
description="<img
src='http://www.example.com/wp-content/uploads/Logo-logo.jpg'
{br} {br} {br}someaddress, someplace{br} T +49 xxx{br}{br}" directionstext="" icon="white" style="1"
pancontrol="yes" scalecontrol="yes" typecontrol="no" streetcontrol="no"
zoom="12" zoomcontrol="yes" draggable="no" scrollwheel="no" width="100%"
height="800px" maptype="roadmap" popup="yes" center="12.345,
12.345" refresh="yes"]

Plugin used: responsive-maps-plugin

I've tried adding code to the plugin to not texturize that shortcode, as per
http://codex.wordpress.org/Plugin_API/Filter_Reference/no_texturize_shortcodes
(for shortcode "res_map"). But that doesn't seem to make a difference.

It seems to me like if the preg that tries to detect shortcodes and not texturize those might have problems with the embedded html-code in the above shortcode.

Change History (4)

#1 @speedpartner
10 years ago

If the problem is about code in the shortcode-attributes, then I wonder if tickets like #29661 or maybe #29557 are somehow related.

#2 @miqrogroove
10 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Hi speedpartner,

Your bug is related to a plugin so we can't address it here on the core system.

Also, your shortcode contains an orphaned < character, which may or may not be part of the problem.

Please contact the plugin author about this. You may also reference this note about HTML in shortcodes:

http://codex.wordpress.org/Shortcode_API#HTML

Good luck.

#3 @speedpartner
10 years ago

Thanks a lot for the hint with the missing character. Didn't see that. Yes, it caused a "hickup" in the parser inside wptexturize(). Fixing that the code got parsed correctly.

(In the end the img didn't get displayed - maybe due to some HTML-cleaning on the attributes. But removing that image was also okay.)

#4 @DrewAPicture
10 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.