Fix image with alt text for html/md to bbcode

This commit is contained in:
Harald Eilertsen
2024-02-06 16:23:39 +01:00
parent eb6a143fff
commit 983f063d33
3 changed files with 51 additions and 0 deletions

View File

@@ -219,6 +219,7 @@ function html2bbcode($message)
node2bbcode($doc, 'a', array('href'=>'/(.+)/'), '[url=$1]', '[/url]');
node2bbcode($doc, 'img', array('src'=>'/(.+)/', 'width'=>'/(\d+)/', 'height'=>'/(\d+)/'), '[img=$2x$3]$1', '[/img]');
node2bbcode($doc, 'img', array('src'=>'/(.+)/', 'alt'=>'/(.+)/'), '[img=$1]$2', '[/img]');
node2bbcode($doc, 'img', array('src'=>'/(.+)/'), '[img]$1', '[/img]');