help to better help you:

Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!

HTML entities showing in title

HTML entities showing in title

3 years 6 months ago - 3 years 6 months ago
#28641
On my site I import data from an external source. In this source special characters are stored as enitites. An apostrophe is written as
Code:
’
and thus stored as such in the title field of JEM.
When showing an event with a entity either in list view or detail view, the entity is not rendered as the character, but shows as the entity itself. See for example: www.ugenda.nl/agenda/event/120646-fortarock-jinjer-humanity8217s-last-breath-hypno5e-uitverkocht

What can I do to have JEM show the correct character? I have a meta characterset defining the page as UTF-8.
Last edit: 3 years 6 months ago by stevent.

Please Log in or Create an account to join the conversation.

Re: HTML entities showing in title

3 years 6 months ago - 3 years 6 months ago
#28643
sorry, I can't help, someone else?

When I write this with jce in an article, it seems to be the same??? So this is not only a JEM problem.
Last edit: 3 years 6 months ago by jojo12.

Please Log in or Create an account to join the conversation.

Re: HTML entities showing in title

3 years 6 months ago - 3 years 6 months ago
#28650
This could be because of the ' could be a SQL character. So it will be converted to #8217; on save to prevent SQL injections or so, I think, not 100% sure.

But normally if it would be handled correctly this string should be rendered as apostroph by browsers.

Try using #39; (single quote, on QWERTZ-keyboards shift + #: ') instead of #8217; (right single quotation mark: ’). It seems nearly the same but istn't the same character.
Not type #39; in the text, just '.

EDIT:
I removed the & before eacht character-number because the forum translates them correctly.
Last edit: 3 years 6 months ago by Egnarts.

Please Log in or Create an account to join the conversation.

Re: HTML entities showing in title

3 years 6 months ago
#28653
Just to be clear, I have a crontab that triggers a script each night that reads a xml feed form an other website.. The data of the external source is imported into the database directly. I don't have control over the data / characters / entities in the source.
And it's not only with the apostrophe. All entities are not rendered correctly.

Please Log in or Create an account to join the conversation.

Re: HTML entities showing in title

3 years 6 months ago - 3 years 6 months ago
#28655
How the characters are written in the xml feed?
Are they escaped with &#...; or are they written normal?

I took again a look at your url and in the text, the last characters are written correctly (...m; ‘A Distant (Dark) Source’.)
So it seems for me like a problem with the title
Last edit: 3 years 6 months ago by Egnarts.

Please Log in or Create an account to join the conversation.

Re: HTML entities showing in title

3 years 6 months ago
#28657
Most probably you won't like it, but of cause a workaround could be a call to a converter within you cron job.
I have seen similar problems with other web applications several years ago, but I do not remember the causes, sorry.
The following user(s) said Thank You: jojo12

Please Log in or Create an account to join the conversation.

Time to create page: 0.513 seconds