Forum Discussion
Content Not Published
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)
- Delete the spoiler sections and images completely.
- Save the post.
- Refresh the page to reload a clean editor context.
- Re-insert the spoilers and images using the editor toolbar only — don’t paste from other sources.
- 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:
- Use Notepad or VS Code to write your content in Markdown or plain text first.
- Build sections step-by-step using the MTC editor toolbar — especially for:
- Images
- Spoilers
- Code blocks
- 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 |
- AllenJul 21, 2025
Community Manager
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!
- Sep 26, 2025
Noted Allen. will ensure
- JKPieterseSep 23, 2025Silver Contributor
Allen If by design may I express my opinion this isn't a well thought through design? I had it pop up today, with a manually typed response where it tripped over the link I pasted as plain text. Only when I hit the space bar it messed up:
- AllenSep 25, 2025
Community Manager
JKPieterse Thank you for your post, your rank in the community is sufficient that you should not be be getting errors like this. Would you be able to send me via Private message what you were trying to post and where you were trying to post it so I may review what happened?