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
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

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 323 times
reviewer.decision.confirm.jpg
Example of correct javascript message
reviewer.decision.confirm.jpg (13.05 KiB) Viewed 325 times
merge.users.mssg.jpg
Merge users confirmation message, with original code.
'{translate|escape:"htmlall"
merge.users.mssg.jpg (17.54 KiB) Viewed 327 times
ramon
 
Posts: 931
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: aleskl, Bing [Bot], ctgraham, Yahoo [Bot] and 7 guests