We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Folks,
URL Tracking breaks when there are Accented Characters.
Example of URL that does not work: https://domain.com/auth/signin?utm_source=canal_proprietario&utm_medium=email&utm_campaign=1_botão2
I tried to fix it by editing app/lib/postal/message_parser.rb:
On line 4:
URL_REGEX = /(?<url>(?<protocol>https?)\:\/\/(?<domain>[A-Za-z0-9\-\.\:]+)(?<path>\/[A-Za-z0-9\.\/\+\?\&\-\_\%\=\,\~\:\;\(\)\[\]#]*)?+)/
I changed to:
URL_REGEX = /(?<url>(?<protocol>https?)\:\/\/(?<domain>[A-Za-z0-9\-\.\:]+)(?<path>\/[a-zA-Zà-úÀ-Ú0-9\.\/\+\?\&\-\_\%\=\,\~\:\;\(\)\[\]#]*)?+)/
This change works fine on regex101.com, but does not work on Postal. Actually it breaks all tracking urls.
The text was updated successfully, but these errors were encountered:
It looks like the implementation of regex in ruby might be a little different/opinionated
The documentation mentions some POSIX-style matching syntax which might be more accurate, are you able to check?
https://ruby-doc.org/core-2.7.0/Regexp.html#class-Regexp-label-Character+Properties
Sorry, something went wrong.
No branches or pull requests
Folks,
URL Tracking breaks when there are Accented Characters.
Example of URL that does not work:
https://domain.com/auth/signin?utm_source=canal_proprietario&utm_medium=email&utm_campaign=1_botão2
I tried to fix it by editing app/lib/postal/message_parser.rb:
On line 4:
URL_REGEX = /(?<url>(?<protocol>https?)\:\/\/(?<domain>[A-Za-z0-9\-\.\:]+)(?<path>\/[A-Za-z0-9\.\/\+\?\&\-\_\%\=\,\~\:\;\(\)\[\]#]*)?+)/
I changed to:
URL_REGEX = /(?<url>(?<protocol>https?)\:\/\/(?<domain>[A-Za-z0-9\-\.\:]+)(?<path>\/[a-zA-Zà-úÀ-Ú0-9\.\/\+\?\&\-\_\%\=\,\~\:\;\(\)\[\]#]*)?+)/
This change works fine on regex101.com, but does not work on Postal. Actually it breaks all tracking urls.
The text was updated successfully, but these errors were encountered: