ese-unibe-ch / ese2012-team4

5 stars 1 forks source link

User Input Control, Item #12

Closed r-burn closed 12 years ago

r-burn commented 12 years ago

No scripts allowed in descriptions and names of Items. Edit Page and Create page.

misch commented 12 years ago

possibly useful links: http://haml.info/docs/yardoc/file.REFERENCE.html#escaping_html http://haml.info/docs/yardoc/Haml/Filters.html http://haml.info/docs/yardoc/Haml/Options.html#escape_html-instance_method

gianlucamateo commented 12 years ago

was anscheinend auch funktioniert: vor jede ausgabe ein :escaped

also z.B.

.textbox.value

%p

-user.description.each do |line|

:escaped

{line}

%br

würde die user description ausgeben, ohne scripts auszuwerten. habs kurz getestet, scheint zu funktionieren, auch wenns vielleicht nicht die eleganteste Lösung ist.