OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



UTF-8 searches

Are you an Editor, Author, or Journal Manager in need of help? Want to talk to us about workflow issues? This is your forum.

Moderators: jmacgreg, michael, vgabler, John

Forum rules
This forum is meant for general questions about the usability of OJS from an everyday user's perspective: journal managers, authors, and editors are welcome to post questions here, as are librarians and other support staff. We welcome general questions about the role of OJS and how the workflow works, as well as specific function- or user-related questions.

What to do if you have general, workflow or usability questions about OJS:

1. Read the documentation. We've written documentation to cover from OJS basics to system administration and code development, and we encourage you to read it.

2. take a look at the tutorials. We will continue to add tutorials covering OJS basics as time goes on.

3. Post a question. Questions are always welcome here, but if it's a technical question you should probably post to the OJS Technical Support subforum; if you have a development question, try the OJS Development subforum.

UTF-8 searches

Postby jkacmarcik » Thu Feb 24, 2005 2:08 pm

We're in the process of setting up a journal that will include articles (in html) that include UTF-8 character encoding. Everything works well except the searching, so I fixed it.

includes/functions.inc.php:
line 128
Code: Select all
array_push($vars, htmlspecialchars($var));
becomes
Code: Select all
array_push($vars, str_replace('&', '&', htmlspecialchars($var)));


line 151
Code: Select all
array_push($vars, htmlspecialchars($var));
becomes
Code: Select all
array_push($vars, str_replace('&', '&', htmlspecialchars($var)));


htmlspecialchars() strips out html tags, slashes and ampersands -- however the ampersands are needed in UTF-8.

So, is there any reason that the ampersands can't be left alone? There shouldn't be any [new] security issues, if someone wanted to get an ampersand past as-is they could use a doubly encode one.

-jeffrey
jkacmarcik
 
Posts: 1
Joined: Thu Feb 24, 2005 1:47 pm

Return to OJS Editorial Support and Discussion

Who is online

Users browsing this forum: No registered users and 3 guests