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

AddHtml , img base64, ODtext : strange behavior #2240

Open
ledahu opened this issue Jun 10, 2022 · 1 comment
Open

AddHtml , img base64, ODtext : strange behavior #2240

ledahu opened this issue Jun 10, 2022 · 1 comment

Comments

@ledahu
Copy link

ledahu commented Jun 10, 2022

using Html::addHtml()

$html= "<body><p><img src="data:image/jpeg;base64,XXXXXXX" /></p></body>

writer HTML : ok
writer Word2007 : ok
writer ODText : img not showing, but existing without error in the ODT XML (odt is zip, just extract it)

then

$html= "<body><img src="data:image/jpeg;base64,XXXXXXX" /><p>stuff</p></body>

=> img showing in ODT

$html= "<body><div><img src="data:image/jpeg;base64,XXXXXXX" /></div></body>

=> img showing in ODT

just saying

Note: for those wondering how add /> in img,br,hr tag from summernote&other textarea editor, i use HTMLPurifier on the string :

 $config = HTMLPurifier_Config::createDefault();
        $config->set('URI.AllowedSchemes',array('data' => true));
        $this->HTMLPurifier=new HTMLPurifier($config);
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this is still an issue for you, please try to help by debugging it further and sharing your results.
Thank you for your contributions.

@github-actions github-actions bot added the Stale label Sep 21, 2022
@Progi1984 Progi1984 removed the Stale label Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants