Formatting WordPress comments, e.g. on the Stack Overflow official blog

One would expect Markdown to be supported on the Stack Overflow official blog, but it is not. It is a WordPress-based blog and there aren’t any comment plugins in use. Also, comments get lost if JavaScript is not allowed from certain domains.

Note that all formatting, e.g., bold and italics (or at least in the preview and pre-approved view) broke in September 2020. Whether it will actually appear in the public (approved) version is an open question. Links seem to be still working.

Bold and italics

Use HTML formatting, <strong></strong> and <em></em>, respectively. Note that “strong” and “em” are supported, but not “b” and “i”.

Example:

In the <em>title</em> it <strong><em>should</em></strong> be.

Links

Use HTML formatting. A link builder is available (part of Edit Overflow).

Example:

<a href="https://pmortensen.eu/world/EditOverflow.php?LookUpTerm=JQuery">lookup</a>

Result:

lookup

Other considerations

With JavaScript allow listing (NoScript), the submitting of comments on the Stack Overflow official blog silently fails and the comment will be lost forever (another reason for writing the comment off-site, e.g. in a text document). Though in some browsers (in Firefox) it may be possible to save the comment by pressing the back button. It probably also fails for other WordPress-based blogs.

It works if JavaScript is allowed from these domains (but it is currently not known if a smaller set will do):

  • stackoverflow.blog     (for that particular blog)
  • gstatic.com                (this one is a secondary request by the Stack Overflow podcast, not initially requested, only when submitting a comment.)
  • pressablecdn.com     (not present on all WordPress sites)
  • simplecast.com         (not present on all WordPress sites)
  • wp.com

Positively not needed:

  • gaug.es
  • doubleclikck.net
  • google-analytics.com
  • googletagmanager.com
  • youtube.com

Note: This is not a guarantee! For example, the set of required domains to be able to post a comment has gradually changed over time and will probably continue to change. If anything goes wrong, the comment may be lost. Always save the comment offline and paste into the comment field.

Checklist before submitting a comment

  1. Have you used HTML links and not Markdown links!?!?
  2. Have you used HTML formatting for bold and italics and not Markdown formatting for the same?
  3. Have you enabled JavaScript from the required domains?

Hidden features

WordPress blogs usually have an automatic RSS feed. Add “feed” to the end of the base URL to get the RSS feed URL. It works both for this blog and the Stack Overflow blog: https://pmortensen.eu/world2/feed and https://stackoverflow.blog/feed, respectively.

It works for categories as well. For example, category “Text editors” on this blog: https://pmortensen.eu/world2/category/text-editors/feed or https://pmortensen.eu/world2/category/text-editors/?feed=rss2.

Tagged with:

Leave a Reply

Your email address will not be published. Required fields are marked *

*