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

Properly handle incomplete HTML fragments #622

Merged
merged 2 commits into from
Jan 10, 2023

Conversation

cmer
Copy link
Contributor

@cmer cmer commented Jan 7, 2023

Type of PR (feature, enhancement, bug fix, etc.)

Bug Fix

Description

Properly handle incomplete HTML fragments that would normally be stripped out by Nokogiri. For example, <tr><td></td></td> is invalid by itself because it is not wrapped in a table element. This PR detects these instances and handle them gracefully.

Fixes # (issue)

Why should this be added

Ability to morph parts of a table is important.

Checklist

  • My code follows the style guidelines of this project
  • Checks (StandardRB & Prettier-Standard) are passing
  • This is not a documentation update

Please note that the best way to suggest changes or updates to the documentation is to join Discord and leave a note in the #docs channel. Any documentation updates posted as PRs cannot be accepted at this time. ❤️

@marcoroth
Copy link
Member

Hey @cmer, I pushed up a commit which merges your work with a previous state I had in #601. Would you mind testing this pull-request against your app to see if it still works as expected. Thank you!

@marcoroth marcoroth added this to the 3.5 milestone Jan 10, 2023
@cmer
Copy link
Contributor Author

cmer commented Jan 10, 2023

I smoke-tested it in the browser and it seems to work, indeed! @marcoroth

@marcoroth
Copy link
Member

Thank you @cmer!

@marcoroth marcoroth merged commit cc2d33c into stimulusreflex:new_installer Jan 10, 2023
marcoroth added a commit to marcoroth/stimulus_reflex that referenced this pull request Jan 11, 2023
# Type of PR (feature, enhancement, bug fix, etc.)

Bug Fix

## Description

Properly handle incomplete HTML fragments that would normally be
stripped out by Nokogiri. For example, `<tr><td></td></td>` is invalid
by itself because it is not wrapped in a `table` element. This PR
detects these instances and handle them gracefully.

Fixes # (issue)

## Why should this be added

Ability to morph parts of a table is important.

## Checklist

- [x] My code follows the style guidelines of this project
- [x] Checks (StandardRB & Prettier-Standard) are passing
- [x] This is not a documentation update

Co-authored-by: Marco Roth <marco.roth@intergga.ch>
@marcoroth
Copy link
Member

marcoroth commented Jan 11, 2023

I noticed that this pull request was created to merge into the new_installer branch.

I just cherry-picked this commit into master as 69cb070.

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.

2 participants