configuration - What is the meaning of this tag <sanitize> in portal-model-hints.xml? -


i curious following line mean in file portal-model-hints.xml:

<field name="title" type="string">     <sanitize content-type="text/plain" modes="all" /> </field> 

so here questions:

  1. what changes <sanitize> tag make field?
  2. what attributes mean?
  3. what different types of modes?
  4. and there other attributes tag?

i have gone through wiki deals model-hints.

thanks

it seams me hint says liferay portal use sanitizer before storing field database. sanitizers filtering elements "sanitize" web content (usually html or javascript code) doesn't contain unappropiate content javascript malicious code or swearwords, example. can find more info on sanitizers here.

so answers questions are:

what changes tag make field? - field should sanitized

what attributes mean? - field supposed contain plain text , sanitizer use sanitizing mode

what different types of modes? - can find there 3 modes ("all", "bad_words" , "xss") far in sanitizer.java

and there other attributes tag? - have't managed find other attribute


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -