Hi,

Module works well. Exactly what I was looking for.
In order to simplify copy &paste for non specialists user, do you know how I could remove the DOCTYPE definition in the generated output?

Thanks

Laurent

Comments

jbomb’s picture

I believe the DOCTYPE definition is generated in enews.tpl.php. That template can be overridden by copying it to the active theme directory. Once it's been copied, flush the theme cache using the devel module, drush or by resubmitting the form at http://yoursite.com/admin/build/themes. Finally, simply removing the DOCTYPE declaration from the relocated enews.tpl.php file should remove it from the output.

Agence Web CoherActio’s picture

Hi,
This is what I've done this initially. However the DOCTYPE still remains.
After investigation, it seems to be generated by emogrifier.
Any clues on fixing this ?

Laurent

jbomb’s picture

That is frustrating. Have you considered using hook_form_alter to replace the exported #value with a substring that starts after the first line break or the doctype declaration? It seems a little dirty, but should work as a pot boiler.

[edit]

That is to say, it's not a permanent solution, but it's the only one that comes to mind immediately.

Agence Web CoherActio’s picture

Thanks. This is basically what I've done. As you said; not very clean but it works.

AaronBauman’s picture

I'm pretty sure Emogrifier adds the Doctype, via php's DOMDocument class, during the process of inlining all the CSS and whatnot.
So, yeah, form_alter is not a pretty solution, but unless you want to muck with emogrifier.php ,that's probably the best approach.

AaronBauman’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.