Bug Report #3306

Select validation needs to convert htmlentities

Added by Andreas Burger over 4 years ago.

Status:NewStart date:10/04/2010
Priority:NormalDue date:
Assignee:Ben Midget% Done:


Category:-Spent time:-
Target version:1.1
Resolution: Points:



When using HTML entities manually in select values, the validate_this()-function of the select driver does always return an error.

Value = "DSL-over-Air 3000/750 - 34,90 €"
Displayed and transmitted as: "DSL-over-Air 3000/750 - 34,90 €"

In line 85 of the select driver it is checked if the transmitted value exists in the $keys array
if (! in_array(strtolower($this->value), $keys) AND (! $this->has_blank() OR $this->value !== ''))

This does not work, because the the utf-8 char is transmitted, not the htmlentity.

Convert transmitted chars back to entities
if (! in_array(strtolower(htmlentities($this->value, ENT_COMPAT, "utf-8")), $keys) AND (! $this->has_blank() OR $this->value !== ''))

Possible problems: * If the system does not use UTF-8, the conversion will not work * I don't know if this works for all html-entities

Maybe it would be better to find another way to check if there is an error in this case.

Also available in: Atom PDF