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
pressablecdn.com     (not present on all WordPress sites)
simplecast.com          (this one is no longer requested by the Stack Overflow podcast. Not present on all WordPress sites)
wp.com

Positively not needed:

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

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 *

*