*Webアプリケーションでの文字化けの対処
HTML特殊文字 < > < > & 等を < > & 等に置換する必要がある。
*[http://struts.apache.org/1.3.8/apidocs/org/apache/struts/util/ResponseUtils.html#filter(java.lang.String) org.apache.struts.util.ResponseUtils.filter()]
を利用する。
*基本的に、Strutsのタグ<<bean:write>>等は、デフォルトで処理されている。
'&':'&',
'\'':''',
'<<':'<', '>>':'>'
};
return characterReference[ word ];
}
return text.replace( /"|&|'|<<|>>/g, replacement );
}
----