Versions
all
Description
Textarea form widgets encodes "<" on first submission but double decodes it on second submission.
In the end, the widgets should not encode anything on their own but I know this is not to be changed before Contao 5 for bc sake.
However, I think the double encoding (see reproduction below) should be adressed.
How to reproduce
open: <, close: >, ampersand: & into the textarea but leave the mandatory field empty.open: <, close: >, ampersand: &open: <, close: >, ampersand: & again.thx at @discordier to check this
The problem is the double encoding in the FormTextArea class, which we have introduced in contao/core#8623 (see @ausi's comment). @ausi Maybe we have to rethink the solution?
As discussed in Mumble on May 7th, we want to revert the changes from contao/core#8623 and add a case 'valueRaw' instead. This should fix both issues.
Also, we want to add a comment so we do not forget to remove the specialchars() in Contao 5.
@sebj54 Regarding your ticket contao/core#8623: You can use $textAreaWidget->rawValue to retrieve the unescaped value once #1714 has been merged.