[FW][FIX] tools: fix tool method to check empty html content - #53167
Closed
fw-bot wants to merge 1 commit into
Closed
[FW][FIX] tools: fix tool method to check empty html content#53167fw-bot wants to merge 1 commit into
fw-bot wants to merge 1 commit into
Conversation
Since a recent commit[1], we have a utility method in tools named 'is_html_empty' that checks whether the given html content is void(containing only formatting tags) or not. However, the re from this method does not consider the case of self closing tags, fox ex `<br/>`. In such cases, the method returns Falsy value even if the content is void. This commit fixes the issue by considering self-closing void tags in the regular expression. commit[1] - odoo@974f512 Task - 2267689 X-original-commit: 0fd6c93
Contributor
Author
|
Ping @dja-odoo, @tde-banana-odoo To merge the full chain, say
More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
Contributor
|
@fw-bot r+ |
robodoo
pushed a commit
that referenced
this pull request
Jun 17, 2020
Since a recent commit[1], we have a utility method in tools named 'is_html_empty' that checks whether the given html content is void(containing only formatting tags) or not. However, the re from this method does not consider the case of self closing tags, fox ex `<br/>`. In such cases, the method returns Falsy value even if the content is void. This commit fixes the issue by considering self-closing void tags in the regular expression. commit[1] - 974f512 Task - 2267689 closes #53167 X-original-commit: 0fd6c93 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
dharmrajsinh-jhala
deleted the
master-saas-13.3-fix-tools-empty-html-dja-SCiE-fw
branch
June 18, 2020 04:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the issue/feature this PR addresses:
is_html_emptymethod from 974f512 does not consider self-closing tag.Current behavior before PR:
If the html content contains self-closing tags (for example
<br/>), the above method returnsFalseeven if the content is void.Desired behavior after PR is merged:
Regular Expression from method
is_html_emptyalso considers self-closing tags while checking for void content.--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: #53157