-
Notifications
You must be signed in to change notification settings - Fork 116
[FIX] html_builder: error message for invalid URL #4601
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
[FIX] html_builder: error message for invalid URL #4601
Conversation
This PR targets the un-managed branch odoo-dev/odoo:master-mysterious-egg, it needs to be retargeted before it can be merged. |
Hello 👋 I had a small discussion with @robinlej yesterday before I left, so a better way to fix it would be at |
be2bffc
to
83a1fb2
Compare
Hello, I made a change in the fix before I saw your message. I did not do exactly what you asked. If the URL is not valid I simply don't call the onApply function. The advantage of doing this is that it works for any invalid url not only "https://" and "http://". One drawback might be that now, the onApply call is done after loadAsyncLinkPreview has finished. If this is an issue, I can modify the code by splitting loadAsyncLinkPreview in two to avoid waiting on an asynchronous function before calling onApply. Let me know what you think. |
83a1fb2
to
adf86a7
Compare
I also don"t really know if there are cases in which we want to call the onApply function even if the URL is invalid |
adf86a7
to
e702b8c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is my feedback, hope it helps 🙏
f243f33
to
06c1bb5
Compare
addons/html_builder/static/src/website_preview/website_builder_action.js
Outdated
Show resolved
Hide resolved
06c1bb5
to
55423d5
Compare
Looks good to me, just remember the translation remark from Robin and then we are good to go 😉 |
55423d5
to
686e695
Compare
[LEBL] Select a text, add a link, add "http://", save, click on the link, traceback occurs
https://pad.odoo.com/p/mysterious-egg-builder-editor-bug