Ampersands getting over-escaped going from Wordpress to Discourse?

When WordPress articles have an & in the title, like

they land on our Discourse site with an HTML entity & instead:

Entities like this don’t seem to get rendered in titles.

I see that there is a title fancy entities setting in Discourse, and that this is enabled by default. But that seems like the opposite problem — the entity is there, but isn’t getting rendered.

Is there a config setting I should change here? Or is there a bug? Or … something else?

1 Like

Thanks for the report Matt. I’m investigating this.

1 Like

Thanks again Matt, this will be fixed in the next version of the WP Discourse plugin (2.5.2).

1 Like

Hi @angus,

Thanks for the fix, but unfortunately, we got the same issue as the one reported by @mattdm.


Would you please be able to see what the issue is here?

Thanks in advance!

Hey @Festinger, could I first confirm:

  1. Which version of the plugin you’re running.
  2. What you mean by the “same issue”. Could you describe exactly what happened or share a link to a live example. The issue in this topic is not present in the link you shared.


1 Like

Thanks for your reply @angus.

We’re running the latest version, 2.5.2.

The issue is that the HTML entities are not converted if a thread is created based on a WordPress post. Our crew has modified the thread title; I’m sorry about that.

The initial title was posted like this.

Thanks that’s helpful! Yours is in fact a slightly different issue insofar as it’s not an ampersand, but an en-dash. I understand that may not seem like a difference, however in this case it is, see further:

I’ll put a fix for this additional encoding issue in the next version.


Thanks for the reply @angus.

Does it also work for current posted items on Discourse?

edit: after checking it with the latest version of the Discourse WP plugin, the issue persists. When a topic is updated, the HTML entity is replaced by an en-desh.

There hasn’t been a release yet. Hang tight.


Thanks, I’m looking forward to the patch! :+1:

I just received the patch and it is working like a charm. Thanks for the update @angus