-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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] protect jinja2 expressions from being messed with #158
Conversation
// this is '#39' per default which screws up single quoted text in ${} | ||
entities_additional: '', | ||
protectedSource: [ | ||
/\n*\s*%.*\n*/gm, // line expressions, keep newline if any |
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.
@hbrunn I don't know why but this comments aren't minifing correctly and broke JS, check it in runbot.
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.
@antespi thanks, should work now (I don't have an instance at hand right now, that's guessing)
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.
@hbrunn It's working now (JS doesn't broke when minified). But other issue (Invoice Email Template broken when edited) is still there. Thanks
This is not fixing this use case:
When return to Compose Email modal, body content has been disappeared. Original:
Modified by ckeditor:
Pay attention at |
@antespi thanks for your observation! I won't have time to look into this any time soon, could you try the following:
|
|
@hbrunn could you check comment of @RoelAdriaans-B-informed #158 (comment). It could be very useful, thanks! |
@rafaelbn I have, but as he stated, my suggestions didn't help. Which is a pity, but that's all I can say currently (no time to look into this deeply). If you need this issue to be fixed, I'd suggest you to look into my comment to try some more guesswork: #158 (comment) |
@antespi @rafaelbn @RoelAdriaans-B-informed merge #213 (and if this works, it's worth a thumbs up there ;-) ), then merge this branch with the commit from just now. With this, the editor adds some extra whitespace (which shouldn't matter), causing line statements to be treated properly. And the code update in #213 makes protecting of expressions within attributes work |
@hbrunn Too bad, still didn't solve the problem :-( |
@RoelAdriaans-B-informed how does the code look before and after? And did you double check you're running ckeditor 4.5.3? |
oh, and did you also double check you applied commit 8e8508d? |
another thing to check: did you refresh the page after the update? otherwise, you get the old versions of js code |
@RoelAdriaans-B-informed you were right, still a small thing wrong. With my last commit, you get this: https://runbot.odoo-community.org/runbot/build/3114496 In this instance, I installed |
@RoelAdriaans-B-informed @antespi can you please check if the patch is correct for merging this? |
@hbrunn we are not using anymore CKEditor4, but maybe you do. Are you still interested? Is this safe to be merged? |
it still messes up some jinja expressions, but less bad than before, so yes, I think we can merge this |
OK, please make these 2 changes:
|
9907b5f
to
b145b56
Compare
It's no longer an issue here; Few clients are still using 8.0, and none of them are using this module anymore... |
Update Dockerimage & odoo-template
b145b56
to
9e9e1c4
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.
👍 LGTM and all review remarks taken up and implemented.
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
fixes #151