Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving a record using the DB datahandler htmlspecialchars all data #90

Open
oliverklee opened this issue Sep 28, 2018 · 4 comments
Open

Comments

@oliverklee
Copy link
Contributor

If I save something using a TEXT renderlet, it gets htmlspecialchared before it gets saved into the DB.

Example

Ein schönes & gutes "Haus" > Wohnung

… gets saved as

Ein schönes & gutes "Haus" > Wohnung

The data must not be htmlspecialchared before it gets saved to the DB.

This is with the current master of mkforms (3.0.21) and rn_base (1.8.4).

@digedag
Copy link
Contributor

digedag commented Oct 1, 2018

Hey @oliverklee ,
try to set option sanitize="false" for this renderlet.

@oliverklee
Copy link
Contributor Author

Hi @oliverklee, thanks for the help! I'll try that.

Is there also a way to set this for a complete form?

And in general, I think this default behavior is not correct. Data needs to be HSCed on output, not when it gets inserted into the DB. So I propose to change the default to not HSC the data on saving.

@digedag
Copy link
Contributor

digedag commented Oct 1, 2018

Yes, I totally agree with you. I think we will discuss the issue again.

oliverklee added a commit to oliverklee/ext-realty that referenced this issue Oct 18, 2018
oliverklee added a commit to oliverklee/ext-realty that referenced this issue Oct 18, 2018
@hannesbochmann
Copy link
Member

Problem is that the escaping is done globally in the getValue() method of renderlets. There is no distinction between using the value in the FE output or elsewhere. But would be needed imho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants