Posting Source Code on WordPress.com Problem
-
Hi,
I posted the sourcecode when I wrote the wordpress article via the editor in
wordpress.comand the result looks weird.Sourcecode
[code language="text"]<div data-spotim-module="recirculation" data-spot-id="sp_XXXXXXXX"></div> <script src="https://recirculation.spot.im/spot/sp_XXXXXXXX"></script> <script src="https://launcher.spot.im/deferred/bundle.js" data-spotim-module="deferred-launcher" data-spot-id="sp_XXXXXXXX" data-post-id="POST_ID_HERE"></script>[/code]Result
ref : https://dsin.wordpress.com/2018/02/13/spot-im-integration/
The blog I need help with is: (visible only to logged in users)
-
Did you use the editor at My Sites ->Blog posts to post that?
Please check what happens if you use html entities rather than the arrow brackets.
Also check if it makes a difference if you use the editor in WP-Admin instead:
-
-
You should be able to use either editor, but I’m trying to confirm if the problem is restricted to only one editor, or if it’s rather with the type of code you’re trying to post.
-
-
Okay, it looks like for some reason the presence of the data-* attributes are causing the problem, and the script-tags also don’t want to save at all. I’m opening a bug report for this, but I can’t make any promises on if or when this might be fixed. For now I’d recommend using the WP-Admin editor for any posts containing embedded code like that.
Alternatively, you might want to consider publishing your code in a Gist and embedding that instead:
https://en.support.wordpress.com/gist/
You can follow the bug report here:
-
-
- The topic ‘Posting Source Code on WordPress.com Problem’ is closed to new replies.