Roo/htmleditor/BlockFigure.js
authorAlan <alan@roojs.com>
Fri, 7 Jan 2022 07:24:38 +0000 (15:24 +0800)
committerAlan <alan@roojs.com>
Fri, 7 Jan 2022 07:24:38 +0000 (15:24 +0800)
Roo/htmleditor/BlockFigure.js

index a8fe4e2..b8c6d77 100644 (file)
@@ -205,7 +205,7 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
             tag : 'img',
             contenteditable : 'false',
             src : this.image_src,
-            alt : d.innerText.replace(/\n/g, " "), // removeHTML..
+            alt : d.innerText.replace(/\n/g, " ").replace(/\s+/g, ' ').trim(), // removeHTML and reduce spaces..
             style: {
                 width : 'auto',
                 'max-width': '100%',