Forum Discussion

kwlange's avatar
kwlange
Helper
14 years ago

REST API - emoticons in messages

I am posting reports with a large amount of text to our community from a Java program via the REST API, and the topic is loaded with emoticons when viewed through Lithium.  Is there an option in the API to turn these off when using the messages/post method?  I need strings containing "):", "(:", "mailto:Pam" etc to be rendered literally.  I have found that changing these characters to their html coded equivalents doesn't work, and that may be because I'm using Java's encode function on the body of the message before posting the message.  I want to continue using html so I can use tags in the message to make certain text bold, change font sizes and add horizontal lines.  Thanks for any advice.

1 Reply

  • AdamN's avatar
    AdamN
    Khoros Oracle
    14 years ago

    Hi kwlange,

     

    In the admin under Display > Emoticons, there are two options:

    • "Turn off emoticons everywhere" - This may be a bit over-kill
    • "Turn off emoticons within preformatted text" - If this is enabled, emoticons will not be used within <pre> tags.

    So if you've enabled the latter option, you should be able to wrap your text in a <pre> tag and that will prevent the emoticons from appearing.

     

    One caveat; however... The default styling for <pre> tags is what's used for our "Insert Code" feature. If you don't like how this appears, you could assign your own class for the <pre> tags you insert and then style as needed.

     

    I hope this helps!