tags appearing in my post HTML that messes up mobile formatting
-
Sometimes when I check my blog on my iPhone I find that some paragraphs are set at a different font size than others. (The same posts look fine in my PC browser.) When I check the post, and look in HTML view, I see that those paragraphs are wrapped in <span> tags, specifically <span style=”font-size:14.84px;line-height:1.5;”>…</span>. When I delete these and resave, the mixed font sizes goes away.
I do my creating and editing in visual view. What could I be doing that causes these errant <span>s? How do I prevent them?
Blog: blog.jimgrey.net.
The blog I need help with is: (visible only to logged in users)
-
Hi there,
That’s odd! You mentioned that you create and edit your posts in the Visual editor. Do you ever copy and paste text into the editor there? Sometimes, when you copy and paste from other sources, those <span> tags (and other HTML) are included. You can avoid that by pasting it as plain text using the little icon that looks like a clipboard with the letter “T” in your Visual editor.
If you don’t think that’s the cause of the problem, or if it keeps popping up, could you send me a link to one of the blog posts where these tags are appearing? I’d be happy to take a closer look at it for you. :)
-
Thank you for replying!
I generally do not copy/paste text into the visual editor. I open the visual editor and compose directly in it.
I have been fixing this in posts but I do have one pending where it appears. It is scheduled to post
http://jimgrey.wordpress.com/2013/12/01/the-kodak-brownie-starmatic-and-efke-100/
Edit the post, go into Text mode, and search for the text “When I walked the streets of Indianapolis with my Polaroid SX-70, I wore the Brownie around my neck, too. I thought this tree was dramatic, so I shot it.” An instance of this problem appears there.
-Jim
-
Hi Jim,
I see what you mean about that <span> tag in your post there. I’ve been testing some things, but I can’t reproduce the issue on my end. Can you describe your process when you first start drafting your posts? (Any details about what steps you take to write the post could be helpful.)
-
Unfortunately, I am unsure exactly what I am doing when this problem occurs. Can we keep this thread open while I experiment to see if I can give you some recreate steps? It might take me a few days.
-
Sure thing! I’ll keep testing on my end, too, to see if I can figure out what’s going on here.
If you are able to recreate the problem, you can reply in this thread and let me know what steps you took when you were writing the post. That should go a long way to helping me troubleshoot the issue and hopefully find a fix for you. :)
-
Hi! I still can’t reliably reproduce this issue, but what I’m noticing is that when it happens, I’ve inserted links into the paragraph. It never happens when a paragraph has no links, though it only sometimes happens when the paragraph does have links.
Please check this pending post: http://blog.jimgrey.net/2014/01/06/captured-head/
The second paragraph has links and also this <span font> nonsense.
Thanks,
-Jim -
Hi Jim,
I’ve been checking with my team about this issue, and we have some reports that Chrome adds this span tag when you highlight, click, and drag text to move it around in your post. Does that sound like something you may have done while writing your post?
If that’s the case, it’s a known issue in Chrome (something Chrome considers a feature). Since it’s built into Chrome, it isn’t something we can always fix on our end. The best way to avoid it is to cut and paste text to move it, instead of clicking and dragging it.
If you didn’t click and drag the text to move it around, please let me know. Any other details about how you write and edit your post before you notice these tags will help as we investigate the issue. Thanks!
-
Ah! I do use Chrome. I don’t deliberately drag to move text, but I do it inadvertently, and apparently fairly often. Thanks for explaining the root cause of this one. -Jim
-
Whew! I’m so glad we could find the cause. :) You’re very welcome, and please let me know if I can provide any further help.
- The topic ‘tags appearing in my post HTML that messes up mobile formatting’ is closed to new replies.