OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Javascript encoding problems

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

Javascript encoding problems

Postby ramon » Tue Oct 02, 2007 8:09 am

Hello,

I'm running into a strange problem.

I have only ONE javascript message that is being garbled when displayed in the alert box.

All other javascript messages are ok...

I added a CDATA, removed it, and nothing changed.

Then I changed the character set to ISO (not sure if it's Latin-1, though), which converted special characters to HTML characters, but most special characters are not displayed in the HTML.

Server and page, as well as DB and connection are UTF-8 by default, so I don't know what may be causing this.

I played with the template and the translation to see if something fixed this.

Throughout the templates, the selectMergeUser.tpl is the only one with:
Code: Select all
'{translate|escape:"htmlall"


All others, including links have:
Code: Select all
'{translate|escape:"javascript"


I assume it's because of the user names that have to be displayed.

When I change the selectMergeUser.tpl to:
Code: Select all
'{translate|escape:"html"

the message is correct, but usernames are not replaced, as the image below shows.

If I change to
Code: Select all
'{translate|escape:"javascript"
, no matter what I do to the locale file, the message is either truncated or not displayed at all, creating a javascript error.

Any ideas?
Attachments
merge.users.mssg.html.jpg
Merge users displaying correct characters, but no usernames
'{translate|escape:"html"
merge.users.mssg.html.jpg (17.69 KiB) Viewed 363 times
reviewer.decision.confirm.jpg
Example of correct javascript message
reviewer.decision.confirm.jpg (13.05 KiB) Viewed 365 times
merge.users.mssg.jpg
Merge users confirmation message, with original code.
'{translate|escape:"htmlall"
merge.users.mssg.jpg (17.54 KiB) Viewed 367 times
ramon
 
Posts: 945
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 3 guests