etjones/LiveParametric — Issue #1: DropdownList strings containing HTML chars are ignored
Author: etjones
Created: 2012-02-24 18:42:21+00:00
State: open

### Bug description

If HTML characters (angle brackets, etc.) are sent to a DropdownList (or other VariableDicts, probably) the bracketed parts will be ignored.

A solution would be to use cgi.escapeHTML to escape all LP strings, but cgi isn't included in SU's Ruby. Will investigate an alternative solution.

### Workaround
Er, for the moment don't use strings with angle brackets in them.

### Demo program:
class DropdownBugExample < LiveParametric
# Correct behavior would yield a dropdown list with these entries:
# good element
# missing word
#
# Actual behavior yields:
# good element
# missing word
def default_variables
possible_vals = ["good element", "missing word"]
[ DropdownList.new("test_dropdown", possible_vals)]
end
def create_entities( data, container)
container.add_face( [[0,0,0],[0,1,0],[1,0,0]])
end
end