• It seems the wordpress editor occasionally replaces standard 0x020 space characters with 0x0a0 (unicode non-breaking space). I haven’t been able to isolate exactly what causes this, probably some weird transition between the text and visual modes during editing. But it sometimes causes our instagram feed pro to gag on the shortcodes.

    Took me two days to figure this out! ?? A working and non-working short code look identical in the wordpress editor but if I copy them over to a hex editor, I can see the non-working one has a 0x0a0 instead of a 0x020 space character between the shortcode name and the parameter.

    So I guess the question is, does this need to be fixed in the instagram plugin or upstream in the WP core shortcode handling code?

    https://www.ads-software.com/plugins/instagram-feed/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Craig at Smash Balloon

    (@craig-at-smash-balloon)

    Hello Steevithak,

    We have had a few people mention this problem when they updated to WordPress 4.4 but that could have just been a coincidence and we are looking into the issue to make sure that everything is working correctly.

    Thanks for letting us know about this. Could you do me a favor and send me the exact shortcode you were using so I can try to recreate the issue? If you were adding “divs” or anything along with it could you just let me know a little bit about that too?

    Hope you are having a great day!

    – Craig

    Thread Starter steevithak

    (@steevithak)

    Sure, here’s a copy-and-paste of an example shortcode with the 0x0a0 character in it:

    [instagram-feed?includewords=”#chairs” num=30 cols=4]

    If this forum preserves 0x0a0 characters, you should see it in the white space between “instagram-feed” and “includewords”. And, if not, you can insert a 0x0a0 there with any hex editor and copy into WP for testing. I run Fedora GNU/Linux and use the Midnight Commander text editor in hex mode to read/write text files in hex.

    My best guess at the root cause is that I inadvertently put two spaces between the shortcode name and first parameter when I created it. After upgraded to WP 4.4, someone edited the article, triggering WP’s new non-breaking space algorithm. I think the WP editor now tries to preserve the extra space by converting one of the spaces from 0x020 to 0x0a0. I’ve posted about this in the WordPress support forum as well because I suspect it’s a bug, at least in that WP shouldn’t be messing with space characters inside a shortcode.

    Plugin Author Craig at Smash Balloon

    (@craig-at-smash-balloon)

    Thanks again Steevithak!

    It looks like there is an issue with the latest update and the shortcode regex handling. The only fix we have is just being conscience of this as an issue and retyping shortcodes to see if you can get them working. I appreciate you taking some time to look into this issue though!

    – Craig

    Plugin Author smashballoon

    (@smashballoon)

    To follow on from what Craig said, it does appear to be related to a shortcode bug in the recent WordPress 4.4 update as many other plugins have reported the same issue. There’s a bug report in WordPress Trac for this and so hopefully it will be resolved in the WordPress 4.1 update. If it isn’t then we can look into this more closely to see whether there’s anything we can add to the plugin to minimize/fix the problem.

    John

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Shortcodes with 0x0a0 spaces not parsing correctly’ is closed to new replies.