projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b963216
)
Consistently use the U(ngreedy) flag in the 'img-reorder' filter
author
Fabian Keil
<fk@fabiankeil.de>
Sat, 18 Mar 2017 17:54:11 +0000
(18:54 +0100)
committer
Fabian Keil
<fk@fabiankeil.de>
Thu, 1 Mar 2018 10:42:48 +0000
(11:42 +0100)
default.filter
patch
|
blob
|
history
diff --git
a/default.filter
b/default.filter
index
fd5c12e
..
ea826f2
100644
(file)
--- a/
default.filter
+++ b/
default.filter
@@
-221,8
+221,8
@@
FILTER: img-reorder Reorder attributes in <img> tags to make the banners-by-* fi
# and banners-by-link to preserve the original image URL in the title attribute.
s|<img\s+?([^>]*)\ssrc\s*=\s*(['"])([^>'" ]+)\2|<img src=$2$3$2 $1|siUg
# and banners-by-link to preserve the original image URL in the title attribute.
s|<img\s+?([^>]*)\ssrc\s*=\s*(['"])([^>'" ]+)\2|<img src=$2$3$2 $1|siUg
-s|<img\s+?([^>]*)\ssrc\s*=\s*([^'">\\\s]+)|<img src=$2 $1|sig
-s|(<img[^>]+height)\s*=\s*|$1=|sig
+s|<img\s+?([^>]*)\ssrc\s*=\s*([^'">\\\s]+)|<img src=$2 $1|si
U
g
+s|(<img[^>]+height)\s*=\s*|$1=|si
U
g
s|<img (src=(?:(['"])[^>'" ]*\2\|[^'">\\\s]+?))([^>]*)\s+width\s*=\s*((["']?)\d+?\5)(?=[\s>])|<img $1 width=$4$3|siUg
s|<img (src=(?:(['"])[^>'" ]*\2\|[^'">\\\s]+?))([^>]*)\s+width\s*=\s*((["']?)\d+?\5)(?=[\s>])|<img $1 width=$4$3|siUg