Skip to content

fix: regex for email protection is less greedy now

Jacek Lebioda requested to merge fix-to-email-obfuscator into develop

(it was matching one character too much in certain cases)

We had a bug when having:

<a href="mailto:safety-sb@uni.lu">safety-sb@uni.lu</a>
it was converted to
<a href="mailto:%73%61%66%65%74%79-%73%62@%75%6E%69.%6C%75>safety-sb@uni.lu</a>
                                                          ^ here
note the lack of trailing quotation mark -----------------+ 
After the fix it will be added:
----------------------------------------------------------+
                                                          v
<a href="mailto:%73%61%66%65%74%79-%73%62@%75%6E%69.%6C%75">safety-sb@uni.lu</a>

The bug was caused on the improper assumption that mailto can have quotation marks after colon

Merge request reports