-
Notifications
You must be signed in to change notification settings - Fork 1
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
LPD-46264 - Extract inline styles #4668
base: master
Are you sure you want to change the base?
LPD-46264 - Extract inline styles #4668
Conversation
# breaking ## What portal-kernel/src/com/liferay/portal/kernel/content/security/policy/ContentSecurityPolicyHTMLRewriter.java portal-kernel/src/com/liferay/portal/kernel/content/security/policy/ContentSecurityPolicyHTMLRewriter.java includes a utility that extracts inline event handlers and styles from the same DOM node ## Why The method deeds a more generic name as it considers more attributes to extract
CI is automatically triggering the following test suites:
|
❌ ci:test:sf - 0 out of 1 jobs passed in 4 minutesClick here for more details.Base Branch:Branch Name: master Sender Branch:Branch Name: LPD-46264 1 Failed Jobs:For more details click here.format-source-files: [java] java.lang.Exception: Found 2 formatting issues: [java] 1: ./modules/apps/frontend-taglib/frontend-taglib-clay/src/main/java/com/liferay/frontend/taglib/clay/servlet/taglib/AlertTag.java expected:<...icyHTMLRewriterUtil.[rewriteInlineAttributes( [java] ] sb.toString(), ...> but was:<...icyHTMLRewriterUtil.[ [java] rewriteInlineAttributes( [java] ] sb.toString(), ...> [java] 2: ./util-taglib/src/com/liferay/taglib/ui/CSPTag.java expected:<...icyHTMLRewriterUtil.[rewriteInlineAttributes( [java] ] bodyContent.get...> but was:<...icyHTMLRewriterUtil.[ [java] rewriteInlineAttributes( [java] ] bodyContent.get...> [java] [java] at com.liferay.source.formatter.SourceFormatter.format(SourceFormatter.java:472) [java] at com.liferay.source.formatter.SourceFormatter.main(SourceFormatter.java:301) [stopwatch] [run.batch.test.action: 1:57.741 sec] [echo] The following error occurred while executing this line: [echo] /opt/dev/projects/github/liferay-portal/portal-impl/build.xml:498: The following error occurred while executing this line: [echo] /opt/dev/projects/github/liferay-portal/portal-impl/build.xml:651: Java returned: 1 [typedef] Could not load definitions from resource org/apache/maven/artifact/ant/antlib.xml. It could not be found. [taskdef] Could not load definitions from resource org/jacoco/ant/antlib.xml. It could not be found. [delete] Deleting: /opt/dev/projects/github/liferay-portal/null864637582.properties |
Jenkins Build:test-portal-source-format#7260 Jenkins Report:jenkins-report.html Jenkins Suite:sf Pull Request:liferay-frontend#4668 Testray Routine:EE Pull Request Testray Build:[master] ci:test:sf - juanjofgliferay > liferay-frontend - PR#4668 - 2025-01-17[00:43:53] Testray Build ID:111014750 Testray Importer:publish-testray-report#27633 |
ci:test:sf |
✔️ ci:test:sf - 1 out of 1 jobs passed in 5 minutesClick here for more details.Base Branch:Branch Name: master Sender Branch:Branch Name: LPD-46264 1 Successful Jobs:For more details click here. |
Jenkins Build:test-portal-source-format#8398 Jenkins Report:jenkins-report.html Jenkins Suite:sf Pull Request:liferay-frontend#4668 Testray Routine:EE Pull Request Testray Build:[master] ci:test:sf - juanjofgliferay > liferay-frontend - PR#4668 - 2025-01-17[01:14:05] Testray Build ID:111023080 Testray Importer:publish-testray-report#4772 |
String elementStyles = element.attr("style"); | ||
|
||
if (Validator.isBlank(elementStyles)) { | ||
return; |
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.
This would break the recursive logic, right? 🤔
Meaning it wouldn't process children if the parent has no style
attribute...
.../portal/security/content/security/policy/internal/ContentSecurityPolicyHTMLRewriterImpl.java
Outdated
Show resolved
Hide resolved
...tal/security/content/security/policy/internal/ContentSecurityPolicyHTMLRewriterImplTest.java
Outdated
Show resolved
Hide resolved
…ppears in the parent
ci:test:sf |
✔️ ci:test:sf - 1 out of 1 jobs passed in 4 minutesClick here for more details.Base Branch:Branch Name: master Sender Branch:Branch Name: LPD-46264 1 Successful Jobs:For more details click here. |
Jenkins Build:test-portal-source-format#8488 Jenkins Report:jenkins-report.html Jenkins Suite:sf Pull Request:liferay-frontend#4668 Testray Routine:EE Pull Request Testray Build:[master] ci:test:sf - juanjofgliferay > liferay-frontend - PR#4668 - 2025-01-17[04:30:32] Testray Build ID:111101588 Testray Importer:publish-testray-report#33370 |
ci:test:relevant |
ci:test:sf |
✔️ ci:test:sf - 1 out of 1 jobs passed in 4 minutesClick here for more details.Base Branch:Branch Name: master Sender Branch:Branch Name: LPD-46264 1 Successful Jobs:For more details click here. |
Jenkins Build:test-portal-source-format#3880 Jenkins Report:jenkins-report.html Jenkins Suite:sf Pull Request:liferay-frontend#4668 Testray Routine:EE Pull Request Testray Build:[master] ci:test:sf - juanjofgliferay > liferay-frontend - PR#4668 - 2025-01-17[04:59:30] Testray Build ID:111118162 Testray Importer:publish-testray-report#15878 |
Jenkins Build:test-portal-acceptance-pullrequest(master)#19798 Jenkins Report:jenkins-report.html Jenkins Suite:relevant Pull Request:liferay-frontend#4668 Testray Routine:EE Pull Request Testray Build:[master] ci:test:relevant - juanjofgliferay > liferay-frontend - PR#4668 - 2025-01-17[04:41:23] Testray Build ID:111377795 Testray Importer:publish-testray-report#42789 |
ci:test:relevant |
Jenkins Build:test-portal-acceptance-pullrequest(master)#19829 Jenkins Report:jenkins-report.html Jenkins Suite:relevant Pull Request:liferay-frontend#4668 Testray Routine:EE Pull Request Testray Build:[master] ci:test:relevant - juanjofgliferay > liferay-frontend - PR#4668 - 2025-01-20[00:09:14] Testray Build ID:113253656 Testray Importer:publish-testray-report#42864 |
Story / Task
LPD-44564 / LPD-46264
Goal
Extend ContentSecurityPolicyHTMLRewriter scope so it extracts event handlers and inline styles using the same DOM node.