Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC:

HTML entities showing in title 11 months 1 week ago #28641

  • stevent
  • stevent's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 144
  • Thank you received: 40
On my site I import data from an external source. In this source special characters are stored as enitites. An apostrophe is written as
’
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-fortar...-hypno5e-uitverkocht

What can I do to have JEM show the correct character? I have a meta characterset defining the page as UTF-8.

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

Last edit: by stevent.

HTML entities showing in title 11 months 1 week 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.
on JEM 2.3.3 stable in latest Joomla (3.10.2) Protostar php7.4.15
Personally I use t4_B5 template with t4_system plugin framework with bootstrap 5 and fontawesome)
(I prefer free "Signal" or paid "Threema" instead of "Whatsapp".)

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

Last edit: by jojo12.

HTML entities showing in title 11 months 1 week 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.
Rosen sind rot, gelb ist die Biene, ich kann nicht dichten, Waschmaschine.

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

Last edit: by Egnarts.

HTML entities showing in title 11 months 1 week ago #28653

  • stevent
  • stevent's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 144
  • Thank you received: 40
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.

HTML entities showing in title 11 months 1 week 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
Rosen sind rot, gelb ist die Biene, ich kann nicht dichten, Waschmaschine.

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

Last edit: by Egnarts.

HTML entities showing in title 11 months 1 week 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.

  • Page:
  • 1
  • 2
Time to create page: 1.130 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.

Follow us......