hhuijser/liferay-portal — pull request #1881 by jonathanmccann (2014-05-09 18:40:48+00:00)
Title: LPS-46720

Hey Hugo,

A little background on this one: I was working on https://issues.liferay.com/browse/LPS-46692 where I found out that I needed to escape the user's search parameters since we stored "&" as "&" in the database. I began modifying the CustomSQL to encode the user's keywords, but then I ran across the issue at hand. What is happening is that the Title and Description of the Web Content do not encode the ">" character but the Content section does. This made it more difficult to solve the initial search problem because now I needed two methods: one to encode ">" and one to not. So, I just decided to update the Woodstox jar to always encode the ">" (as per the Javadoc I posted on the LPS). The reason the Content was encoded it is because it was going through a separate process to get the content and build the XML.

The "writeCharacters" method is only used within LocalizationImpl and the UI can handle the encoded ">" properly so the UI and everything else is working properly.

With this change, it will make the search fix much simpler and easier to implement. Let me know if you have any questions.

Thanks.