Internet Explorer dropping the "v" in .gov email addresses in a PHP app [closed]
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this questionWe've built an online event registration application buil开发者_如何学Pythont in PHP. We've discovered a bug in which email addresses entered into the system (for auto-email reply, self-retrieving one's registration, etc) and the email addy is a .gov email address, the "v" gets dropped, therefore all emails generated from the system do not get sent to the proper recipient. We've done testing and this appears to only occur when the registrant uses Internet Explorer.
We fixed the bug and here is what we found:
"It was javascript--client side script. Every email address went through a function called "trim()" during the page data validation step. Trim() was intended to strip non-printing characters (spaces, tabs, etc) that were leading or trailing the address. The characters are identified using a backslash notation: \t is tab for example. There is another non-printing character called a Vertical Tab, which is (normally) defined \v. But apparently a version of IE released sometime in the last 15 months enterprets \v as "v" and it stripped that character. The fix was basically to gut my "trim()" function. It now does nothing"
Though, we would like to know why IE's javascript engine stopped interpreting \v as vertical space and started interpreting it as the letter 'v'.
精彩评论