From e8da3254f06defe32a7d590fdfbf98285479fbb7 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Tue, 6 Dec 2022 16:57:46 +0000 Subject: [PATCH] fhemweb.js: truncate "Copy to forum" to 60k (Forum #129858) git-svn-id: https://svn.fhem.de/fhem/trunk@26799 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/www/pgm2/fhemweb.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fhem/www/pgm2/fhemweb.js b/fhem/www/pgm2/fhemweb.js index 5af656da9..a778589ab 100644 --- a/fhem/www/pgm2/fhemweb.js +++ b/fhem/www/pgm2/fhemweb.js @@ -1002,6 +1002,10 @@ FW_detLink() } else if(cmd == "forumCopy") { FW_cmd(FW_root+"?cmd=list -r -i "+dev+"&XHR=1", function(data) { var ta = document.createElement("textarea"); + if(data.length > 60*1000) { + data = data.substr(0,60*1000)+ + "\n# ... truncated to 60k, original length "+data.length; + } ta.value = '[code]'+data+'[/code]'; document.body.appendChild(ta); ta.select();