Unicode characters in EmbeddedHTML element

Bug #998011 reported by Tuure
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Xibo
Invalid
Undecided
Unassigned

Bug Description

When we put some strange signs in server in EmbeddedHTML page element (for example polish symbols łóąćń) we get error and nothing will show up in client.

Solution change in client BrowserMediaBase.py file lines:

tmpHtml = tmpHtml.replace("<!--[[[BODYCONTENT]]]-->",self.injectContent())

to

tmpHtml = tmpHtml.replace("<!--[[[BODYCONTENT]]]-->",self.injectContent().decode('utf-8'))

similar

tmpHtml = tmpHtml.replace("<!--[[[HEADCONTENT]]]-->",self.injectScript())

change to

tmpHtml = tmpHtml.replace("<!--[[[HEADCONTENT]]]-->",self.injectScript().decode('utf-8'))

I think the same problem occur when we want to put strange symbols in other element (such as text). But I didn't investigate how to correct it.

Revision history for this message
Alex Harrington (alexharrington) wrote :

Doing that breaks other character sets.

If you ensure your content is UTF-8 encoded before you enter it in the system you'll find it works without modification.

If it doesn't, the default locale for your PHP is probably incorrectly set.

Alex

Revision history for this message
Alex Harrington (alexharrington) wrote :

For reference, we have all kinds of unicode languages in the test suite so the clients are tested with this stuff already.

In general, please don't log bugs until you've discussed any problem in the Answers section of Launchpad where we can work through these things before clogging the bugtracker.

Alex

Changed in xibo:
status: New → Incomplete
Dan Garner (dangarner)
Changed in xibo:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.