mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
fhemweb.js: Escape longpoll reading-value if not in <html></html> (Forum #57377)
git-svn-id: https://svn.fhem.de/fhem/trunk@12282 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
9bdc20237d
commit
9ac79ab012
@ -635,7 +635,15 @@ FW_doUpdate()
|
||||
} else {
|
||||
if(d[2].match(/\n/))
|
||||
d[2] = '<pre>'+d[2]+'</pre>';
|
||||
$(this).html(d[2]); // Readings-Value
|
||||
|
||||
var ma = /^<html>(.*)<\/html>$/.exec(d[2]);
|
||||
if(!d[0].match("-")) // not a reading
|
||||
$(this).html(d[2]);
|
||||
else if(ma)
|
||||
$(this).html(ma[1]);
|
||||
else
|
||||
$(this).text(d[2]);
|
||||
|
||||
if(d[0].match(/-ts$/)) // timestamps
|
||||
$(this).addClass('changed');
|
||||
$(this).find("a").each(function() { FW_replaceLink(this) });
|
||||
|
Loading…
Reference in New Issue
Block a user