Skip to content
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

Shortcut in safe_html #66

Merged
merged 2 commits into from
Aug 6, 2024
Merged

Shortcut in safe_html #66

merged 2 commits into from
Aug 6, 2024

Conversation

reinhardt
Copy link
Contributor

Check for signs of html or script, skip further processing if none are found. Saves processing time for lxml parsing and manipulation.

See also plone/plone.app.content#288

@mister-roboto
Copy link

@reinhardt thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

@reinhardt
Copy link
Contributor Author

@jenkins-plone-org please run jobs

Check for signs of html or script, skip further processing if none are found.
Saves processing time for lxml parsing and manipulation.
@davisagli
Copy link
Sponsor Member

pre-commit.ci autofix

@davisagli
Copy link
Sponsor Member

@jenkins-plone-org please run jobs

Copy link
Sponsor Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@davisagli davisagli merged commit 85d7947 into master Aug 6, 2024
14 checks passed
@davisagli davisagli deleted the scrub-shortcut branch August 6, 2024 01:35
reinhardt added a commit to plone/plone.app.content that referenced this pull request Aug 6, 2024
There is now a similar check inside scrub_html, see
plone/Products.PortalTransforms#66
mister-roboto pushed a commit to plone/buildout.coredev that referenced this pull request Aug 8, 2024
Branch: refs/heads/master
Date: 2024-08-02T16:20:19+02:00
Author: Manuel Reinhardt (reinhardt) <reinhardt@syslab.com>
Commit: plone/plone.app.content@2524e28

getVocabulary: Call scrub_html on individual items, but check for script/html first

Fixes JSONDecodeError when terms contain incomplete HTML

Files changed:
A news/288.bugfix
M plone/app/content/browser/vocabulary.py
M plone/app/content/tests/test_widgets.py
Repository: plone.app.content

Branch: refs/heads/master
Date: 2024-08-06T08:23:33+02:00
Author: Manuel Reinhardt (reinhardt) <reinhardt@syslab.com>
Commit: plone/plone.app.content@6fb696a

getVocabulary: Remove check for scrub_html

There is now a similar check inside scrub_html, see
plone/Products.PortalTransforms#66

Files changed:
M plone/app/content/browser/vocabulary.py
Repository: plone.app.content

Branch: refs/heads/master
Date: 2024-08-07T13:11:41+02:00
Author: Manuel Reinhardt (reinhardt) <reinhardt@syslab.com>
Commit: plone/plone.app.content@b44635d

Rename test method

Co-authored-by: Maurits van Rees &lt;maurits@vanrees.org&gt;

Files changed:
M plone/app/content/tests/test_widgets.py
Repository: plone.app.content

Branch: refs/heads/master
Date: 2024-08-08T08:47:57+02:00
Author: Manuel Reinhardt (reinhardt) <reinhardt@syslab.com>
Commit: plone/plone.app.content@6c1e1f2

Extend and explain test

Co-authored-by: Maurits van Rees &lt;maurits@vanrees.org&gt;

Files changed:
M plone/app/content/tests/test_widgets.py
Repository: plone.app.content

Branch: refs/heads/master
Date: 2024-08-08T12:17:01+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@py76.be>
Commit: plone/plone.app.content@0cebad3

Merge pull request #288 from plone/getVocabulary-incomplete-html

getVocabulary: Call scrub_html on individual items

Files changed:
A news/288.bugfix
M plone/app/content/browser/vocabulary.py
M plone/app/content/tests/test_widgets.py
mister-roboto pushed a commit to plone/buildout.coredev that referenced this pull request Aug 8, 2024
Branch: refs/heads/master
Date: 2024-08-02T16:20:19+02:00
Author: Manuel Reinhardt (reinhardt) <reinhardt@syslab.com>
Commit: plone/plone.app.content@2524e28

getVocabulary: Call scrub_html on individual items, but check for script/html first

Fixes JSONDecodeError when terms contain incomplete HTML

Files changed:
A news/288.bugfix
M plone/app/content/browser/vocabulary.py
M plone/app/content/tests/test_widgets.py
Repository: plone.app.content

Branch: refs/heads/master
Date: 2024-08-06T08:23:33+02:00
Author: Manuel Reinhardt (reinhardt) <reinhardt@syslab.com>
Commit: plone/plone.app.content@6fb696a

getVocabulary: Remove check for scrub_html

There is now a similar check inside scrub_html, see
plone/Products.PortalTransforms#66

Files changed:
M plone/app/content/browser/vocabulary.py
Repository: plone.app.content

Branch: refs/heads/master
Date: 2024-08-07T13:11:41+02:00
Author: Manuel Reinhardt (reinhardt) <reinhardt@syslab.com>
Commit: plone/plone.app.content@b44635d

Rename test method

Co-authored-by: Maurits van Rees &lt;maurits@vanrees.org&gt;

Files changed:
M plone/app/content/tests/test_widgets.py
Repository: plone.app.content

Branch: refs/heads/master
Date: 2024-08-08T08:47:57+02:00
Author: Manuel Reinhardt (reinhardt) <reinhardt@syslab.com>
Commit: plone/plone.app.content@6c1e1f2

Extend and explain test

Co-authored-by: Maurits van Rees &lt;maurits@vanrees.org&gt;

Files changed:
M plone/app/content/tests/test_widgets.py
Repository: plone.app.content

Branch: refs/heads/master
Date: 2024-08-08T12:17:01+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@py76.be>
Commit: plone/plone.app.content@0cebad3

Merge pull request #288 from plone/getVocabulary-incomplete-html

getVocabulary: Call scrub_html on individual items

Files changed:
A news/288.bugfix
M plone/app/content/browser/vocabulary.py
M plone/app/content/tests/test_widgets.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants