Problem/Motivation
Steps to reproduce
If allowed, on the CKeditor or any other text paragraph component, or any other text field, add an iframe including or script code, that we just paste the raw value to show an embed (not recommended, but in some cases, for trusted providers, this can be ok - if controlled and checked on the backend, etc.) This will make the node_read_time module stop counting words, hence the estimated read time is not accurate.
Proposed resolution
Make sure script and iframe tags and nested elements are stripped.
Remaining tasks
Review and test.
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | ignore-iframe-and-script-3357171-14.patch | 722 bytes | akshay kashyap |
| #10 | ignore-iframe-and-script-3357171-10.patch | 699 bytes | andreastkdf |
| #9 | ignore-iframe-and-script-3357171-9.patch | 727 bytes | andreastkdf |
| #8 | ignore-iframe-and-script-3357171-8.patch | 735 bytes | andreastkdf |
| #7 | ignore-iframe-and-script-3357171-6.patch | 751 bytes | andreastkdf |
Issue fork node_read_time-3357171
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
andreastkdf commentedComment #3
andreastkdf commentedComment #4
andreastkdf commentedComment #5
andreastkdf commentedComment #6
andreastkdf commentedstrip/remove script and iframe elements
Comment #7
andreastkdf commentedadding patch for #6
Comment #8
andreastkdf commentedfix typo on code added.
Comment #9
andreastkdf commentedFix Could not apply patch!
(trailing whitespaces on patch file)
Comment #10
andreastkdf commentedpatch still failing, apologies, I was on doing the diff on the wrong repo
ignore all previous comments :)
Comment #11
andreastkdf commentedComment #12
andreastkdf commentedComment #13
akshay kashyap commented@andreastkdf
Thanks for the work.
Verified and tested Patch Comment #8 on Drupal 10.1.x Applied patch cleanly but found a warning message when applying a patch.
Comment #14
akshay kashyap commentedCreated a patch to remove the whitespace warning message. Please review it.
Comment #15
andreastkdf commentedThank you! Looks good. I unassigned my self to let a maintainer double check and potentially merge the patch on next release.
Comment #16
gurbakshish commented#14 patch works fine for me. Thanks
Comment #17
akshay kashyap commentedComment #19
yivanov commentedThanks everyone! Closing as Fixed!