هل يتم هروب الرموز & بشكل مفرط عند الانتقال من Wordpress إلى 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)

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

إعجاب واحد (1)

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

إعجاب واحد (1)

Hi @angus,

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

Sample:

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.

Thanks!

إعجاب واحد (1)

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.

إعجابَين (2)

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.

إعجابَين (2)

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

إعجابَين (2)