WordPress does not allow embedded emphasis

  • Unknown's avatar

    This is the second time I’ve had a run-in with WordPress messing with my HTML. This time, it won’t let me embed emphasis. It just decide to close the first emphasis tag before the opening of the second one, leaving a whole chunk of text completely unemphasized.

    What I want to do is perfectly valid HTML:
    http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-em-element

    <p>Cats are cute animals!</p>

    <p>Cats are cute animals!</p>

    This is so frustrating!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Ugh, I forgot about the stupid HTML processing here, too. Gotta DOUBLE-escape HTML entities…!

    Maybe this will work:
    &lt;p&gt;&lt;em&gt;Cats are &lt;em&gt;cute&lt;/em&gt; animals!&lt;/em&gt;</p>

  • Unknown's avatar
  • Unknown's avatar

    Don’t know if this will help you but, http://support.wordpress.com/code/

    There’s also some nice workarounds for HTML at http://wpbtips.wordpress.com/

    As far as posting code in forums:

    You can also put code in between backtick ( ` ) characters.

  • Unknown's avatar

    We cannot help you if you don’t give us a link to the blog, starting with http. We’d only be guessing. Always give us the link, OR link your username to your blog under “Website” on your Profile page.

  • Unknown's avatar

    What you’re trying to describe is called nested tags, not embedded.

    And what you want to do is not “perfectly valid HTML”. Perhaps you didn’t notice that the page you linked to has “DRAFT” written all over it. It’s a work in progress, and the things it introduces won’t work until browsers start to support them (so it’s not a case of “WordPress messing with your HTML”).

    At the moment em means italics, and you cannot further italicize an already italicized text.

  • Unknown's avatar

    Some advice,
    If your going to have fun and experiment with new code in of any type, host your own cheap domain.

    All the free services, (blogger, wordpress.com) do their best to be compliant with all modern browsers.

    This means they will all dismiss some tags, even some old HTML tags
    It would be less frustrating and you aren’t limited to the code suggested above.

  • Unknown's avatar

    @yarnaholic Thanks for providing a calm response to my frustrated postings. Unfortunately those links don’t appear to address my issue.

    Perhaps this will demonstrate the code properly, though: <p><em>Cats are <em>cute</em> animals!</em></p>. (Oh, just noticed that that tip is listed under the posting textbox. Oops.)

    @raincoaster That is categorically untrue, because I’ve provided all of the information that is causing me issue. That request bothered me the last time I had a problem, too. The problem I have is not specific to my blog. If you attempt to use this code in your own blog, you will encounter the same problem.

    @panaghiotisadam Yes, “nested” is indeed a more accurate term than “embedded” when referring to HTML elements, and likely would have used it had it come to me at the time. However, my association of “embedded” with the more broadly-scoped “emphasis” does give me some leeway with regard to the regular English definition. But that’s neither here nor there.

    The more important part of your reply is about HTML5. Yes, it’s draft spec as a whole, but many portions of it are quite stable. What I was attempting to do is not prohibited in HTML4, and the validator confirms that it’s valid code. The HTML5 spec merely codifies it more explicitly as being allowed. In real-life text, you can definitely emphasize already-emphasized text—it just becomes roman again, in most cases. Regardless, though, WordPress is still messing with my HTML by closing my tag prematurely, and corrupting the rest of the paragraph.

    @dlager This has absolutely nothing to do with “experimenting” with anything. I’ve got plenty of other places to do that. This is about WordPress interfering with what is logically and semantically valid code, with absolutely zero gain.

  • Unknown's avatar

    Do you think I ask this because it’s so fun? We have to determine exactly where your blog is hosted before we can provide informed comments and advice. Feel free to continue to not get definitive answers because you did not provide a link.

  • Unknown's avatar

    1. One of the reasons we always ask for a link to the blog is that about 30% of the questions we get are from wp.ORG bloggers (who must be directed to their own forum, because their software is different). Personally I always check the nick as blog name (I wouldn’t have replied to you if I hadn’t found your wp.COM blog this way), but we’re not obliged to do that – most volunteers here won’t do it. Both you and us save time if you give the blog link (as mentioned in the Sticky “8 Things to Know BEFORE Posting”).

    2. “WordPress is still messing with my HTML”. In my test blog it didn’t, no matter if I had the correct-invalid-code option on or not in Settings>Writing.

    3. “In real-life text, you can definitely emphasize already-emphasized text—it just becomes roman again”. You’re joking, aren’t you? (And it’s “regular”, not “roman”: roman means serif font, which is absolutely irrelevant.) To further emphasize already emphasized text you need to make it bold as well, or increase its letter-spacing, or change its color, or capitalize it.

  • Unknown's avatar

    @Panos: In some graphics programs (for print), you can make italics more “italicized,” but in my opinion it looks comic and amateurish.

  • Unknown's avatar

    @Tess: Right. In serious DTP applications you can adjust the degree of slanting, but that’s for modifying the overall appearance of italicized text, not for emphasizing a word within an already italicized text.

  • Unknown's avatar

    Yes. I was thinking of an advert I laid out where they wanted to slant their name believing it would stand out more. Couldn’t talk them out of it. Ha! win some lose some…

  • Unknown's avatar

    Just phoned my friend the DTP specialist, and she told me you’ll never see that in professional work. Normal ways for further emphasis within italics are bold italics or increased letter-spacing, or sometimes regular type, she says.

  • The topic ‘WordPress does not allow embedded emphasis’ is closed to new replies.