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
Fix handling of percent symbols in CheckLength validation routine #910
Comments
I pushed a fix to https://github.com/cqcallaw/tidy-html5/tree/checklength-percent-fix, but I'm having trouble verifying it; when I run the fresh build of tidy through a debugger, I see the |
@cqcallaw thanks for adding this issue... I just pulled, and checked out your Running the debug version in the MSVC debugger, I see the very verbose -
And the same warning, running the release config from the command line...
Maybe you ran the wrong version from the command line? I often add So I find no problem with the patch... it is probably not the way I would code the fix... but to me it does the job, no problems... thanks... |
Thanks - turned out I was accidentally invoking a system-wide install of tidy instead of my local build. D'oh! I hadn't spent much refining the fix, but I did notice one simplification, which is now pushed. For my own education, I'm interested to know how you'd implement the change, though; how would you tackle this issue? |
@cqcallaw can't tell you how many times I have done that... I had not actually coded a fix, but the thought in my mind, was to check the next byte, But now like your current code better... since it avoids have two of the same error messages... which was my only negative about your first code, and mine... but both work, and that is the important thing... thanks... |
@cqcallaw I think I spoke too soon... The present code would pass It seems we do need to repeat the error message... unless you can find another way... without making the code way more complicated than it should be... thanks... |
I completely missed that edge case, good catch! I've pushed a fix that works for me locally; please let me know if that works for you. |
@cqcallaw works for me... and have now merged it... thanks... |
Per discussion on another issue, the string
123%45%6
isn't a valid length value, but wouldn't be flagged as invalid by tidy.The text was updated successfully, but these errors were encountered: