git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
8e1d342
)
issue: keep image formatting after edit
author
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 25 Nov 2021 23:51:53 +0000
(
00:51
+0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Fri, 26 Nov 2021 00:22:05 +0000
(
01:22
+0100)
upload.inc.php
patch
|
blob
|
history
diff --git
a/upload.inc.php
b/upload.inc.php
index f2e101a3a9faa4d412eb28c0e42d3778a30ea076..962bedcbebc2fb73ae64643398cf3075d31408d7 100644
(file)
--- a/
upload.inc.php
+++ b/
upload.inc.php
@@
-63,6
+63,7
@@
function messagehtml($input)
'{<([^>\s|]+)[\s|]([^>]+)>}' => '<a href="$1">$2</a>', # hyperlink
"/\r\n?/" => "\n", # unix newlines
"/ +\n/" => "<br />", # trailing spaces for hard line break
+ '{^(/data/.*\.jpe?g)\z}m' => '<img src="/thumb/640x/\1" />', # image reference
"/^[-*] (.*)$\n?/m" => '<li>$1</li>', # list item
"/^(.+)$\n?/m" => "<p>$1</p>\n", # paragraph
"{^<p>(<li>.*</li>)(?:</p>\n)?}m" => "<ul>$1</ul>\n", # list container