Combination View Flat View Tree View
Threads [ Previous | Next ]
Lionel Ferrer
W3C HTML validation
January 11, 2013 11:42 AM

Lionel Ferrer

Rank: Junior Member

Posts: 42

Join Date: August 3, 2012

Recent Posts

I got this message from W3C validator:
"& did not start a character reference. (& probably should have been escaped as &.)"

The problem is the next:
Inside the action of search form I have a bunch of "&" ... can I replace this character in some way?... or this validation error is common and I can't fix it?

"<form onsubmit="ctem_3_search(); return false;" name="ctem_3_fm" method="get" action=";p_p_lifecycle=0&amp;p_p_state=maximized&amp;p_p_mode=view&amp;p_p_col_count=1&amp;_3_struts_action=%2Fsearch%2Fsearch&amp;_3_redirect=%2F" id="search-form"> "
Samuel Kong
RE: W3C HTML validation
January 14, 2013 6:30 PM

Samuel Kong


Rank: Liferay Master

Posts: 982

Join Date: March 10, 2008

Recent Posts

This is your own custom portlet, correct? You can either use <aui:form> which will automatically escape the data for you. Or you can use one of the escape methods in HtmlUtil to escape the URL.