Skip to content

Log the context in HTMLValidationRule when input is cleaned up - #930

Open
VolodymyrLinuxovich wants to merge 1 commit into
ESAPI:developfrom
VolodymyrLinuxovich:issue-793
Open

VolodymyrLinuxovich wants to merge 1 commit into
ESAPI:developfrom
VolodymyrLinuxovich:issue-793

Conversation

@VolodymyrLinuxovich

Copy link
Copy Markdown

Fixes #793.

When Validator.HtmlValidationAction is set to clean, invalid HTML is sanitized and only logged. That log line did not include the context. The exceptions in the same method already use the format "context=... errors=...". The log message now follows that format.

I added a test to HTMLValidationRuleCleanTest. It attaches a handler to the HTMLValidationRule logger and checks that the context shows up in the message. It fails on develop and passes with this change. The HTMLValidationRule tests and ValidatorTest all pass locally.

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

Successfully merging this pull request may close these issues.

Context should also be logged in HTMLValidationRule

1 participant