How can I avoid Achat ...">

Escape string using Struts2 tags

I try to avoid characters

<s:select list="#{'Achat d'eclair':'Achat d'eclair'}" />

How can I avoid Achat d'eclairin Struts2 tags?

+4
source share
1 answer

First of all, with a note, #{}you create a map where the before value :is the key, and after that the value, and you probably do not want your card key to have several complex characters in it.

To exit ', use \\as follows:

<s:select list="#{'achatdeclair':'Achat d\\'eclair'}" />
+3
source

Source: https://habr.com/ru/post/1598829/


All Articles