98_SVG.pm: fix crash when the link contains a dot (Forum #79431)

git-svn-id: https://svn.fhem.de/fhem/trunk@15563 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2017-12-07 08:21:06 +00:00
parent 4170b3df6e
commit cad7418a5c

View File

@@ -366,6 +366,8 @@ SVG_PEdit($$$$)
return "" if( $pe eq 'never' );
my $gpf = $defs{$d}{GPLOTFILE};
my $gpfEsc = $gpf;
$gpfEsc =~ s,\.,\\\\.,g;
my $link = "$FW_ME?cmd=style edit $gpf.gplot".
(configDBUsed() ? " configDB" : "").$FW_CSRF;
my $gp = "$FW_gplotdir/$gpf.gplot";
@@ -570,9 +572,9 @@ EOF
});
});
setTimeout(function(){
\$("table.internals div[informid=$gpf-GPLOTFILE]").each(function(){
\$(this).html("<a href='$link'>$gpf</a>");
}) }, 10);
\$("table.internals div[informid=$gpfEsc-GPLOTFILE]")
.html("<a href='$link'>$gpf</a>");
}, 10);
</script>
EOF
return $ret;