phoenix007 has asked for the wisdom of the Perl Monks concerning the following question:
How can I avoid double quotes from output of following script. Tried different options to disable this double quotes feature. Every time if there is option in start tag this script is putting it in double quotes
use HTML::TreeBuilder; my $row_html = '<!DOCTYPE html> <body> <p class=3D"MsoNormal">https://www.google.com<o:p></o:p></p> </body>'; my $html = HTML::TreeBuilder->new; $html->ignore_ignorable_whitespace(0); $html->no_space_compacting(1); $html->store_comments(1); $html->parse($row_html); # i will do some modifications to HTML here my $output_html = $html->as_HTML(undef,undef,{}); print $output_html;
Current Output Note the double quotes around value of class="":
<!DOCTYPE html> <html><head></head><body> <p class="3D"MsoNormal"">https://www.google.com<o:p></o:p></p> </body> </html>
I am expecting it without double quotes
<!DOCTYPE html> <body> <p class=3D"MsoNormal">https://www.google.com<o:p></o:p></p> </body>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how can i avoid double quotes in options of start tag
by Corion (Patriarch) on Apr 23, 2019 at 11:12 UTC | |
|
Re: how can i avoid double quotes in options of start tag
by LanX (Saint) on Apr 23, 2019 at 10:48 UTC | |
|
Re: how can i avoid double quotes in options of start tag
by marto (Cardinal) on Apr 23, 2019 at 10:48 UTC | |
by phoenix007 (Sexton) on Apr 23, 2019 at 10:54 UTC | |
by marto (Cardinal) on Apr 23, 2019 at 11:04 UTC | |
by LanX (Saint) on Apr 23, 2019 at 11:18 UTC | |
by LanX (Saint) on Apr 23, 2019 at 11:11 UTC | |
by phoenix007 (Sexton) on Apr 23, 2019 at 11:51 UTC | |
by LanX (Saint) on Apr 23, 2019 at 13:30 UTC |