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

FIX Correctly set img tag attributes for WYSIWYG #340

Conversation

GuySartorelli
Copy link
Member

@GuySartorelli GuySartorelli commented Jul 23, 2024

Fixes https://github.com/silverstripe/recipe-kitchen-sink/actions/runs/10033713755/job/27727409397 and https://github.com/silverstripe/recipe-kitchen-sink/actions/runs/10033713755/job/27727409547 which are variations of

The string "<a href="[sitetree_link,id=3]#youranchor"><img src="file1.jpg" alt=""></a>" should be found in the HTML of the element matching name "Content". Actual content: "<p><a href="[sitetree_link,id=3]#youranchor"><img src="file1.jpg"></a></p>"

Note the missing alt attribute in the actual content. This is because the extended_valid_elements and valid_elements config both had img with different allowed attributes, which caused problems. I've moved that all to be in valid_elements now.

Issue

@emteknetnz emteknetnz merged commit 6057ce5 into silverstripe:3.0 Jul 23, 2024
9 checks passed
@emteknetnz emteknetnz deleted the pulls/3.0/correct-image-wysiwyg-config branch July 23, 2024 02:20
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