WordPress desktop app doesn't handle [code lang=''] tag well
-
I used HTML mode, not Visual mode, for writing my post with the new desktop app for Mac.
I found this problem.
In HTML mode, I typed [code lang='cpp'] manually, but the Mac app HTML-escaped the '. Because it's in a tag and not general text for its content, it should not be &-escaped, or HTML-escaped.Take a look at this screenshot :
https://photos.google.com/album/AF1QipN_yh68o1WmazBN0WH3X4ND7A4wkh2S2fKo71LB/photo/AF1QipOGGCUJwA_QYWYIMCfWUjhXcKcoueFymUVJh1deThe syntax is here. https://en.support.wordpress.com/code/posting-source-code/
The blog I need help with is: (visible only to logged in users)
-
I will type modlook into the sidebar tags on this thread for Staff help. How do I get a Moderator/Staff reply for my question? https://en.support.wordpress.com/getting-help-in-the-forums/#how-do-i-get-a-moderatorstaff-reply-for-my-question Please subscribe to this thread so you are notified when they respond and be patient while waiting. To subscribe look in the sidebar of this thread, find the subscribe to topics link and click it.
-
Hi Jongampark,
Thanks for the report! I’m not able to reproduce this just yet. I tried adding this code to the Desktop Mac app:
[code lang='cpp'] // my first program in C++ #include <iostream> int main() { std::cout << "Hello World!"; } [/code]I published it to my test blog and it seemed to work:
https://poopyheadblog.wordpress.com/2016/05/31/code/You’re correct that it should not escape the ‘. Can you try publishing a test post with this code again and then sending me the link so I can take a look? Thanks!
-
@rachelsquirrel
Hello, after disabling Safari extensions and cookies, it started to work.
Now, I re-enabled those extensions and relaunched. It still works.So, it can be due to some cookies, but is the Visual Editor depends on some cookie values?
Secondly, you used single-quote in the code tag, which is different from the link I provided. The link is WordPress official one. According to the page pointed by the URL has double-quotes for lang attribute, but you used single-quotes. I know that it used to allow single-quote and double-quotes. But one time in the past, they disabled ‘single-quote’. It was like 5 years ago. So, I changed all the posting to use double-quotes. It was very lengthy and tedious job, but I had to, because people who doesn’t know the history of the code formatter were not aware of the change on the WordPress side, and just complaint.
So, it looks to me that WordPress allows single-quotes again!
Let’s be aware of this, OK?Anyway, the bug should be fixed. It must depends on some weird cookie value.
-
Hello, @rachelsquirrel
This issue is totally different from the other one I posted a while ago.
This issue is about things I typed with Mac Desktop WordPress app is changed when checked using a web browser!
Please disregard my previous comment in this thread.
-
This issue is about things I typed with Mac Desktop WordPress app is changed when checked using a web browser!
What might be happening is when the post is opened in a web browser it’s opening in the Visual Editor which is changing those tags to HTML. Try opening the post in the HTML editor only and trying again.
And good catch with the double quotes! I fixed it in my test post.
- The topic ‘WordPress desktop app doesn't handle [code lang=''] tag well’ is closed to new replies.