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

email templates: Mozaik removes images #9265

Open
splendidinternet opened this issue Aug 26, 2021 · 6 comments
Open

email templates: Mozaik removes images #9265

splendidinternet opened this issue Aug 26, 2021 · 6 comments
Labels
Area: Emails:Templates Issues & PRs related to email templates Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Type:Bug Bugs within the core SuiteCRM codebase

Comments

@splendidinternet
Copy link

Issue

I'm editing email attachments with Mozaik editor. I insert an image. I've tried both the image inserting button with upload and the direct HTML-Code with a linked image. The image is inserted and shown until saving.

Expected Behavior

The image should be shown after saving the email template.

Actual Behavior

The image is removed from the HTML. The HTML looks like this:

<img src="" alt="">

Possible Fix

Steps to Reproduce

  1. Go to "Email Templates"
  2. Edit an email template with Mozaik editor
  3. Insert an image to the email template
  4. Save the email template

Context

Your Environment

  • SuiteCRM Version used: 7.11.21
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Firefox 90.0.2 (64-Bit)
  • Environment name and version (e.g. MySQL, PHP 7): PHP 7.4.22
  • Operating System and version (e.g Ubuntu 16.04): Ubuntu 20.04
@johnM2401 johnM2401 added Area: Emails:Templates Issues & PRs related to email templates Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Type:Bug Bugs within the core SuiteCRM codebase labels Aug 26, 2021
@tsmgeek
Copy link
Contributor

tsmgeek commented Aug 26, 2021

Seems very similar to my issue with AntiXSS being overzealous is stripping out "bad" stuff.

#9240
#9248

Can you check those tickets and see if it will resolve your issue.

splendidinternet added a commit to splendidinternet/SuiteCRM that referenced this issue Aug 27, 2021
The newest version of voku/anti-xss is 4.1.x which is fixing salesagility#9265 

The library requires now at least PHP 7.0.0, so I changed this setting.
@splendidinternet
Copy link
Author

@tsmgeek Yes, the update of the AntiXSS has fixed the bug. I've created a pull request.

@tsmgeek
Copy link
Contributor

tsmgeek commented Aug 27, 2021

Great, thanks for confirming.

@timo-ecm2
Copy link

timo-ecm2 commented Sep 8, 2021

I have the same issue ( v7.11.21) with the TinyMCE editor. Instead of a picture I get this;

< src="https:/Specific-url-SuiteCRM-instance.nl/uploads/o_1ff25622h17jueoe1ecmfhj1a8p8.jpg" alt="" />

The results are the same after working with the option; Editor - Direct HTML.
I receive an e-mail with the result below, again no picture.

< src="https:/Specific-url-SuiteCRM-instance.nl/uploads/o_1ff25622h17jueoe1ecmfhj1a8p8.jpg" alt="" />

Great to see that "Update AntiXSS library" is a solution for this.

@SuiteBot
Copy link

This issue has been mentioned on SuiteCRM. There might be relevant details there:

https://community.suitecrm.com/t/version-7-12-2-email-template-builder-images-disapear/84640/2

@SuiteBot
Copy link

This issue has been mentioned on SuiteCRM. There might be relevant details there:

https://community.suitecrm.com/t/email-template-issues/84627/5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Emails:Templates Issues & PRs related to email templates Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Type:Bug Bugs within the core SuiteCRM codebase
Projects
None yet
Development

No branches or pull requests

5 participants