If utf8 text was added to select list(option) there wasnt good utf8 convert in ID, FOR when html was generated, so the thml wasnt valid! This patch fix it.

CommentFileSizeAuthor
select_utf8convert.inc_.patch1.83 KBmibfire

Comments

quicksketch’s picture

I think this patch would cause existing forms to break, since previously the data being saved was unfiltered, after this patch the values will be filtered, causing the data to become split between filtered and unfiltered data. I might be wrong though, I haven't yet tried to test out the patch.

mibfire’s picture

This patch has been working perfectly for me.

quicksketch’s picture

Status: Needs review » Closed (won't fix)

After further review, I've found this will definitely cause a data corruption issue. As long as you've *always* used this patch, it won't cause particular problems (unless the clean version of two options turns into the same key, an option might disappear), but applying this to sites that already have data would cause a split between values that were filtered before saving and values that were unfiltered when saved.

In the 3.x version, we've solve most of these problems by properly encoding options. However I'd like to kill this once and for all by implementing #712324: Convert Select and Grid Options to New Data Storage. This particular change won't be implemented in either version of Webform due to data loss issues.