-
Notifications
You must be signed in to change notification settings - Fork 23.1k
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
[IMP] {google_,microsoft_}calendar: utilize description method #147477
base: master
Are you sure you want to change the base?
[IMP] {google_,microsoft_}calendar: utilize description method #147477
Conversation
e71bbee
to
e9c53ae
Compare
85875fb
to
9f07fd1
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.
Zboing !
@@ -1361,7 +1361,7 @@ def ics_datetime(idate, allday=False): | |||
|
|||
def _get_customer_description(self): | |||
""":return (str): The description to include in calendar exports""" | |||
return html2plaintext(self.description) if self.description else '' | |||
return self.description if self.description else '' |
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.
Could probably use is_html_empty
by the way
@@ -298,7 +298,7 @@ def _google_values(self): | |||
'start': start, | |||
'end': end, | |||
'summary': self.name, | |||
'description': tools.html_sanitize(self.description) if not tools.is_html_empty(self.description) else '', | |||
'description': tools.html_sanitize(self._get_customer_description()) if not tools.is_html_empty(self._get_customer_description()) else '', |
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.
Could be more interesting that _get_customer_description
returns a sanitized / validated / Markupized html so that callers don't have to deal with the output and can consider it is safe
9f07fd1
to
d6e5d79
Compare
hello @tde-banana-odoo , |
d6e5d79
to
a7f5d7e
Compare
f4eed2a
to
c440f82
Compare
aa5a27e
to
5c18efb
Compare
This commit does the following- -Makes _get_customer_description to return HTML data. -Replace the description field with _get_customer_description for google_calendar and microsoft_calendar syncs. Task-3458669
5c18efb
to
3f34240
Compare
This commit does the following-
-Makes
_get_customer_description
to return HTML data.-Replace the description field with
_get_customer_description
for google_calendar andmicrosoft_calendar syncs.
Task-3458669