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

Paste: strip more tags and data-attributes #2438

Merged
merged 4 commits into from Aug 17, 2017

Conversation

Projects
None yet
1 participant
@iseulde
Member

iseulde commented Aug 16, 2017

This PR introduces more tag stripping such as <article> etc. I've been copy pasting content from several sites, and these tags are copied quite a few times. Since we don't handle them, we better strip them than dump it all in a freeform block.

It also strips all data-* attributes.

@iseulde iseulde requested a review from georgeh Aug 16, 2017

@iseulde iseulde changed the title from Strip more tags and data-attributes to Paste: strip more tags and data-attributes Aug 16, 2017

@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot Aug 16, 2017

Codecov Report

Merging #2438 into master will increase coverage by 0.22%.
The diff coverage is 89.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2438      +/-   ##
==========================================
+ Coverage   26.51%   26.74%   +0.22%     
==========================================
  Files         158      158              
  Lines        4853     4895      +42     
  Branches      816      826      +10     
==========================================
+ Hits         1287     1309      +22     
- Misses       3013     3027      +14     
- Partials      553      559       +6
Impacted Files Coverage Δ
blocks/api/paste/strip-wrappers.js 100% <100%> (ø) ⬆️
blocks/api/paste/strip-attributes.js 100% <100%> (ø) ⬆️
blocks/api/paste/index.js 100% <100%> (ø) ⬆️
blocks/api/paste/normalise-blocks.js 96.66% <100%> (+0.66%) ⬆️
blocks/editable/index.js 11.11% <25%> (+0.23%) ⬆️
blocks/editable/format-toolbar/index.js 10% <0%> (+2.5%) ⬆️
editor/utils/url.js 66.66% <0%> (+66.66%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8274602...a1bbfd9. Read the comment docs.

codecov bot commented Aug 16, 2017

Codecov Report

Merging #2438 into master will increase coverage by 0.22%.
The diff coverage is 89.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2438      +/-   ##
==========================================
+ Coverage   26.51%   26.74%   +0.22%     
==========================================
  Files         158      158              
  Lines        4853     4895      +42     
  Branches      816      826      +10     
==========================================
+ Hits         1287     1309      +22     
- Misses       3013     3027      +14     
- Partials      553      559       +6
Impacted Files Coverage Δ
blocks/api/paste/strip-wrappers.js 100% <100%> (ø) ⬆️
blocks/api/paste/strip-attributes.js 100% <100%> (ø) ⬆️
blocks/api/paste/index.js 100% <100%> (ø) ⬆️
blocks/api/paste/normalise-blocks.js 96.66% <100%> (+0.66%) ⬆️
blocks/editable/index.js 11.11% <25%> (+0.23%) ⬆️
blocks/editable/format-toolbar/index.js 10% <0%> (+2.5%) ⬆️
editor/utils/url.js 66.66% <0%> (+66.66%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8274602...a1bbfd9. Read the comment docs.

iseulde added some commits Aug 16, 2017

@iseulde iseulde merged commit de51e24 into master Aug 17, 2017

3 checks passed

codecov/project 26.74% (+0.22%) compared to 8274602
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@iseulde iseulde deleted the add/paste-strip-more-tags-attributes branch Aug 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment