Browser Crashing Bug

fr4nkie wrote on Monday, March 09, 2015:

Just submitted a bug report here:
https://sourceforge.net/p/openemr/bugs/392/

There’s something funny going on when pasting strings that start with a space to certain LBF fields. So far I’ve confirmed the crash to affect the Polcy Number and Group Number fields of the insurance section. Does not seem to affect the “user defined” fields of the general demographics section. I haven’t tested any other fields beyond that, but can keep trying if needed.

yehster wrote on Monday, March 09, 2015:

The javascript code which validates those fields seems to get stuck in an infinite loop if the first character does not match the valid set of characters.

The bug can be reproduced just by hitting the space bar in either of those two fields.

Here’s a commit that addresses the problem.

If you test it out and confirm that the fix works for you, then I will bring the code into the official branch.

fr4nkie wrote on Monday, March 09, 2015:

Thanks Kevin. Will test this tonight. I also noticed in the past that hyphens are rejected from those fields. Now I see from the snippet in your commit that this is by design. Is there a reason those fields only accept A-Z and 0-9?

yehster wrote on Monday, March 09, 2015:

Rejecting hyphen is a bug with my bug fix…

Corrected commit

Hypens as well as a few other characters have been valid for those fields since jun 2011.

fr4nkie wrote on Tuesday, March 10, 2015:

Works like a charm. Thanks for the quick fix Kevin!