-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Implements double_encode in Htmlspecialchars #1862
Conversation
da2f384 will break tests in ext_string , but those tests are invalid (along with a couple others in ext_string.php). Will make a PR to update ext_string test. |
@k-fish you can bundle that change in here since I will need to flatten them to merge this (as all tests have to pass to land a PR) |
This reverts commit d6f6538. Problem was not universal
Here are the differences I see: https://gist.github.com/ptarjan/9126870 |
This should fix one of the 2 bugs remaining |
I'm seeing 3 failures still. (and they are also on travis)
|
I've got this to one bug left on my end, have to flip entity maps to encode to html entities. Updated test to expectf, @ptarjan, what am I doing wrong that the %s is not working for the warning? |
@k-fish first you should rebase on master, since i think that will help a lot of the spurious travis failures. What string-mismatch are you talking about? If the test is failing for some reason, the thing it prints is just a straight diff. Ignore any of the mismatches with |
@ptarjan got the last one, now all tests in ext_string pass on my end. I still get Repostmt errors in TravisCI though. |
I'm also seeing asan aborts with stack buffer overflow in test/zend/good/ext/standard/tests/strings/crypt.php.
I'll re-run with your merge I guess |
Almost there. You still have ASAN failures:
|
Summary: X-link: facebook/folly#1862 Avoid calling clock::now in the common case. Clock::now() can be an expensive call (a call to libc's __clock_gettime). PGO data shows that the first check almost always succeeds, which makes the call to Clock::now redundant. This patch peels one iteration that calls f() before calling clock::now(). Notice that a very common use of this API is a function that performs a single load in the function, so timing is not a major concern. Reviewed By: magedm Differential Revision: D39611860 fbshipit-source-id: 8c7affc83f1e86fe3c8b2401391e1159d08a99ec
Implements double_encode check at '&' char when iterating over string. Identifies utf-8 entities by default (PHP 5.4+).