-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Version 2.1.1 is removing the img from previews #1158
Comments
Hi @xdmx I am having the same issue with 7.1.3.4 and Trix 2.1.1. I noticed that Trix 2.1.1 displays the image preview when using action text 7.1.3.3. Recently the rails team released a security patch for XSS rails/rails@v7.1.3.3...v7.1.3.4 and they added this code which I think introduces the issue.
'img' still appears in the |
@gando001 you're totally right, I've upgraded back just to trick 2.1.1 and it's working, so it's definitely because of that rails change, I'm going to close this and report it there (:man_facepalming:) |
Thanks @xdmx that would be very helpful. I’m still unable to figure out where the issue is or how to fix it |
This was fixed in rails/rails#52093 |
I've upgraded from v1 to v2.1.1 together with a bunch of other dependencies (including rails 7.1.3.4) and migrated back to a vanilla Trix (before I had a Stimulus controller to add color pickers).
I've noticed that I can upload images and they show the preview, but when I go back to the form and the rich text loads the preview doesn't contain the
img
tag anymoreI've tried to downgrade just rails to 7.1.3.3 and trix to 2.1.0 and retried and the preview and the
img
tag shows up. Could it be that the sanitize added in #1149 is removing theimg
tag (thefigure
and caption are there, just theimg
is missing)?The content of the
trix-editor
:Steps to Reproduce
Details
The text was updated successfully, but these errors were encountered: