Index: openacs-4/packages/forums/tcl/messages-format-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/messages-format-procs.tcl,v diff -u -r1.7.2.1 -r1.7.2.2 --- openacs-4/packages/forums/tcl/messages-format-procs.tcl 20 Mar 2023 15:35:59 -0000 1.7.2.1 +++ openacs-4/packages/forums/tcl/messages-format-procs.tcl 20 Mar 2023 16:07:34 -0000 1.7.2.2 @@ -29,31 +29,24 @@ ad_proc emoticons { {-content:required} } { - Convert smileys (emoticons) to img references. It constructs a relative - image reference to graphics/imagename.gif, so it will only work when - used from pages that are directly under the forums/www/ directory. + Convert smileys (emoticons) in supplied content into emoji + HTML entities. -

- - If you change the images make sure to also adapt the image sizes in - the img tag that gets constructed here. + @see https://unicode.org/emoji/charts/full-emoji-list.html } { set emoticons_map [list] # if you change this list, consider changing # www/doc/emoticons.adp as well - foreach { emoticon image } { - ":-)" "smile" - ";-)" "wink" - ":-D" "bigsmile" - "8-)" "smile8" - ":-(" "sad" - ";-(" "cry" - ":-O" "scream" - ":-/" "think" - } { - lappend emoticons_map $emoticon - lappend emoticons_map "\"$emoticon\"" + set emoticons_map { + ":-)" "😊" + ";-)" "😉" + ":-D" "😃" + "8-)" "😎" + ":-(" "😟" + ";-(" "😢" + ":-O" "😱" + ":-/" "🤔" } return [string map $emoticons_map $content] }