Hi, I just made an untested patch as attached to generically solve issues reported: * https://bugs.debian.org/773390 data-realurl ==> href * https://bugs.debian.org/705989 <a>...</a> ==> <a href="$1">...</a>
Then I realize, none of the web page reported as example has such non-standard code any more. Did I miss something? If so, show me a shell code to see such web page example such as: $ wget http::///www.example.org/page $ grep -r "pattern" page.html Anyway, things like this rare non-standard page problem will hit us but should not hard code such fixes into uscan. So idea of having generic solution is good idea. (Even if it will be slow scanning the whole page.) I see special case code for s3.amazonaws.com . I think this is Ubuntu thing since Debian does not seem to have package mentioned. N(Nor I could find package in Ubuntu. Anyway, I am posting this so it will not be lost. Osamu PS: Downloading from git tag seems interesting ...
>From 876764b2114d86a45520b0e0a9e8351658dba2a7 Mon Sep 17 00:00:00 2001 From: Osamu Aoki <[email protected]> Date: Thu, 27 Aug 2015 22:35:38 +0900 Subject: [PATCH 1/2] pagemangle-test --- scripts/uscan.pl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/uscan.pl b/scripts/uscan.pl index ef21e2c..27f56ce 100755 --- a/scripts/uscan.pl +++ b/scripts/uscan.pl @@ -822,6 +822,9 @@ sub process_watchline ($$$$$$) @{$options{'uversionmangle'}} = split /;/, $1; @{$options{'dversionmangle'}} = split /;/, $1; } + elsif ($opt =~ /^pagemangle\s*=\s*(.+)/) { + @{$options{'^pagemangle'}} = split /;/, $1; + } elsif ($opt =~ /^filenamemangle\s*=\s*(.+)/) { @{$options{'filenamemangle'}} = split /;/, $1; } @@ -997,6 +1000,18 @@ sub process_watchline ($$$$$$) print STDERR "$progname debug: received content:\n$content\[End of received content]\n" if $debug; + # pagenmangle: should not abuse this slow operation + foreach my $pat (@{$options{'pagemangle'}}) { + if (! safe_replace(\$content, $pat)) { + uscan_warn "$progname: In $watchfile, potentially" + . " unsafe or malformed pagemangle" + . " pattern:\n '$pat'" + . " found. Skipping watchline\n" + . " $line\n"; + return 1; + } + } + if ($content =~ m%^<[?]xml%i && $content =~ m%xmlns="http://s3.amazonaws.com/doc/2006-03-01/"%) { # this is an S3 bucket listing. Insert an 'a href' tag -- 2.1.4
_______________________________________________ devscripts-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
