Forum Discussion

Nullable's avatar
Nullable
Brass Contributor
Jul 15, 2025

Content Not Published

Sometimes I get a Content Not Published error so I can't publish my post, and I can't tell why.

Content Not Published
Your post contains invalid HTML. Remove the following invalid tags before publishing: a, a (data-bi-type), div, li-image, li-table, li-tcols, li-td, li-tsection
Click to view image

Most recently, it appeared when I tried to edit spoiler titles where I had two images inside two spoilers (same as you see here), after I had already published the post. I was trying to edit the post. But it would not take it the second time around. I think it has something to do with elements used by the rich text editor. I made the changes by deleting both spoilers and both images, saving the post, refreshing, editing again, adding the spoilers and images back in and saving again. It's very annoying and frustrating like that. It's not a validation error, like when you add a link and it complains about it. It says the post contains invalid HTML.

2 Replies

  • hi Nullable​ 

    The "Content Not Published – your post contains invalid HTML" error you're seeing in the Microsoft Tech Community (MTC) is a known pain point

     

    Why it happens ?

    • The editor inserts Microsoft-specific tags like <li-image>, <li-table>, etc. during content creation.
    • These tags aren’t valid HTML but are used by the editor to render features like images, spoilers, and tables.
    • When you edit a post, especially with complex elements like spoilers with images, the platform sometimes fails to properly re-render or sanitize these elements, leading to this error.

    How to work around it (what you're doing is correct but here's a refined version)

    1. Delete the spoiler sections and images completely.
    2. Save the post.
    3. Refresh the page to reload a clean editor context.
    4. Re-insert the spoilers and images using the editor toolbar only — don’t paste from other sources.
    5. Save again.

    You’re basically forcing the platform to purge bad internal formatting and rebuild with clean elements.

    If editing :

    If you're doing repeated editing of rich posts:

    1. Use Notepad or VS Code to write your content in Markdown or plain text first.
    2. Build sections step-by-step using the MTC editor toolbar — especially for:
      • Images
      • Spoilers
      • Code blocks
    3. Avoid switching back and forth between "Rich Text" and "HTML" tabs during editing — this is known to corrupt tag rendering.

     

    Avoid these HTML elements in edited MTC posts

    Tag

    Why it's blocked

    <li-image>

    Not valid HTML; editor-only

    <li-table>, <li-tcols>, <li-td>, <li-tsection>

    MTC-specific table rendering; often gets corrupted

    <a> with data-* attributes

    May conflict with sanitization rules

    <div> inside spoilers or lists

    Breaks layout or flags as unsafe

     

     

    • Allen's avatar
      Allen
      Icon for Community Manager rankCommunity Manager

      Surya_Narayana​ ,

      Good reply sir, just to clarify though the issue your hitting Nullable​  is that users who are new to the community can't include advanced formatting in their post. This means until you have participated enough in the community you can't insert things like tables, images, links into your posts.

      The solution provided by Surya_Narayana​ is still correct its just its not a pain point, its by design, although I appreciate it maybe a pain!

       

Resources