X-Git-Url: https://git.proxmox.com/?p=pve-docs.git;a=blobdiff_plain;f=pve-docs-mediawiki-import.in;h=14dffa09d9e7556f1c13c72145f303f7497b308f;hp=1dc4f2647c9a722c394d3f89b03eedde85bb6768;hb=19b04e775fea4645a075fc4263272c3614795eda;hpb=0d02df33f12a84b417a6806e0d3faa51d1ad7b53 diff --git a/pve-docs-mediawiki-import.in b/pve-docs-mediawiki-import.in index 1dc4f26..14dffa0 100755 --- a/pve-docs-mediawiki-import.in +++ b/pve-docs-mediawiki-import.in @@ -21,7 +21,7 @@ my $config_fn = "/root/.pve-docs"; # format 'username:pw' my $fh = IO::File->new("$config_fn") || die "Please configure the mediawiki user/passswd in '$config_fn'\n"; -my $api_url = "http://localhost/mediawiki/api.php"; +my $api_url = "https://pve.proxmox.com/mediawiki/api.php"; my $config = <$fh>; chomp $config; @@ -55,9 +55,10 @@ sub update_page { my $parser_opts = { api_version => 3, - text_h => [ sub { $pve_content .= shift }, "dtext" ], + text_h => [ sub { $pve_content .= shift }, "text" ], }; my $parser = HTML::Parser->new(%$parser_opts); + $parser->ignore_elements(qw(script style)); my $fh = IO::File->new("/usr/share/pve-docs/$filename", "r") or die "unable to open file '$filename' - $!\n";