Like here in stackoverflow, if I force bad characters into the url in id, it redirects you to a page error. I would like to know if with Grails it has some kind of plugin to prevent id: "123 $ # 3" or an easy way because I have a lot of actions and something like below seems to be not the best way: / p >
def find = {
def val = OwnStringUtilsClass.verify(params.id)
val ? Book.get(val) : response.sendError(404)
}
source
share