-
Notifications
You must be signed in to change notification settings - Fork 753
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
Correctly Encode Text Fields #5106
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great improvement, should we catch also decimals by using "&#" instead of "&#x" only (for hex) ?
Why do we need to catch decimals as per text may create an issue? Decimals without texts should be out of scope. |
Works for me, the only public code path to this is deprecated anyway so this will eventually be removed and consumers are advised to use HtmlEncode instead. So, for now, that works for me. |
Love it, thanks! |
There is a totally unrelated test failing though, I'll re-run the build to see if it's a fluke... |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
05f5e80
to
6840116
Compare
I did a clean push EDIT: Failing test : https://github.com/armaganpekatik/Dnn.Platform/blob/bugfix/Issue-5105/DNN%20Platform/Tests/DotNetNuke.Tests.Core/Providers/Folder/FileManagerTests.cs#L257 EDIT 2: The AddFile_No_Error_When_File_Content_Is_Valid test is failing when we replace the "<", ">" strings. I may break any functionality with doing this. So reverting |
I had to revert it to beginning and applying the advise that you gave @valadas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary
Encoded content is not always correctly decoded, this addition resolves the issue.