Tidy with PHP - output <link>, <style> and <script> elements without explicit type? -
i'm testing tidy php add 'human' layout view of given html page once it's sent browser (it's generated in compressed form default), have problem.
every <link>
element rel
attribute set stylesheet gets type="text/css"
appended @ end. same goes <style>
element, behaves in same fashion. <script>
element gets type="text/javascript"
appended.
while it's fine me, filter these bits out, , know if there's option in tidy configuration (i've been reading option list in tidy website haven't found suggesting me such filtering) or must filtering manually like:
$output = str_replace([" type=\"text/javascript\"", " type=\"text/css\""], ["", ""], tidy_parse_string($input, $options, "utf8"));
is there better filtering procedure one?
Comments
Post a Comment