mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
img_tag(): Tighten up the generated SRC attribute a bit; if the image
relative URL starts with "./", remove "./".
This commit is contained in:
parent
d52879ccdc
commit
d3d28d39f8
1 changed files with 6 additions and 3 deletions
|
@ -251,9 +251,12 @@ sub img_tag {
|
|||
,'border=', $nav_border, ' alt="', $alt
|
||||
,'" src="', $icon, '">' );
|
||||
}
|
||||
return join('', '<img ', $iconsizes{$1}, $align
|
||||
,'border=', $nav_border, ' alt="', $alt, "\"\n"
|
||||
,' src="', $ICONSERVER, "/$icon", '">' );
|
||||
my $s = join('', '<img ', $iconsizes{$1}, $align,
|
||||
'border=', $nav_border, ' alt="', $alt, "\"\n",
|
||||
' src="', $ICONSERVER, "/$icon", '">' );
|
||||
# if $ICONSERVER starts with "./", remove "./":
|
||||
$s =~ s|src="(.\/)+|src="|;
|
||||
return $s;
|
||||
}
|
||||
else {
|
||||
return $icon;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue