botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

[Skype for Business] HTML message formatting inconsistencies (macOS vs Windows)

Open amehta3000 opened this issue 9 years ago • 30 comments

Bot Info

  • SDK Platform: Node.js
  • SDK Version: BotBuilder 3.11.0
  • Active Channels: Skype for Business
  • Deployment Environment: ngrok

Issue Description

Documentation indicates that we can send messages with html and it will format properly on the SFB channel. https://docs.microsoft.com/en-us/bot-framework/nodejs/bot-builder-nodejs-message-create

However, we are seeing dramatic inconsistencies from one platform to another using the same code. Looking for guidance on how to develop and format our messages for Skype for Business so that macOS/iOS will also render html.

We'd like to use the HTML format we are seeing in Skype for Business on windows. When the same code is rendered in macOS, it shows just raw html

Code Example

Not setting textFormat, using the default "markdown".
Setting it to "xml" yields no noticeable change.
response.text is just raw text with html tags, looks similar to what is shown in macOS screenshot below.

var customMsg = new builder.Message(session).text(response.text);
session.send(customMsg);

Expected Behavior

SKYPE for BUSINESS (windows client) sfb_html_markdownii 1

Actual Results

SKYPE for BUSINESS (macOS client update 16.12.77) image

amehta3000 avatar Nov 21 '17 21:11 amehta3000

Thank you for reporting I will ping the Skype for business team.

JasonSowers avatar Nov 21 '17 22:11 JasonSowers

Still waiting on a response, I will update you as soon as possible.

JasonSowers avatar Nov 28 '17 18:11 JasonSowers

Thx, anxiously waiting. Cheers

amehta3000 avatar Nov 28 '17 18:11 amehta3000

Hi there, any updates on this? This behavior is seriously impacting our customers who using Skype for Business on mac OS and iOS. Adding any sort of html added into our dialogs fails to render on iOS at all. Thanks.

amehta3000 avatar Dec 05 '17 00:12 amehta3000

I still have no response, I will ping again.

JasonSowers avatar Dec 05 '17 21:12 JasonSowers

@amehta3000 from the sfb team

Is it possible to get some mac client traces from customer to investigate deeper?

Are you able to provide this?

JasonSowers avatar Dec 06 '17 22:12 JasonSowers

Hi, I'm hoping this is this client logs they are looking for outlined in this article: http://www.itprotoday.com/microsoft-exchange/mac-skype-business-2015-client-side-logs

@JasonSowers, can you please provide me an email address so I can send you the file privately. thx

amehta3000 avatar Dec 06 '17 22:12 amehta3000

@JasonSowers sent

amehta3000 avatar Dec 06 '17 22:12 amehta3000

I received them and have forwarded them to the sfb team, I will let you know as soon as I hear something.

JasonSowers avatar Dec 06 '17 22:12 JasonSowers

@amehta3000 can you prodive this?

From the sfb team:

are you able to get customer’s bot input in message Activity, (the http messsage that bot send to channel which contains that mark down part), I would like to do more experiment on this.

JasonSowers avatar Dec 07 '17 19:12 JasonSowers

Sent privately to you via email, hope it suffices. LMK. thx

amehta3000 avatar Dec 08 '17 21:12 amehta3000

There is an ongoing discussion I will update you as I get information. At this point, I would look into possibly changing your HTML to markup.

JasonSowers avatar Dec 08 '17 21:12 JasonSowers

Thanks Jason, I think it is interesting cause Markdown renders down to HTML so I would expect HTML to just work out the box. That being said, I've started trying to use Markdown but it just doesn't render as well as HTML, and we lose the ability to show color along with formatting font sizes that I can get with HTML on a PC.

Seems like the only thing I can get is bold and italics to work.

My main frustration is that line breaks in Markdown don't seem to work as expected on either channel. Should be 2 spaces (\s\s) but both PC and Mac completely disregard it. If I put <br> then PC will give me a line break but Mac will render the <br> in raw text. I'll follow up with some additional screenshots.

We appreciate your help and communication with the team there. thx for any more insight.

amehta3000 avatar Dec 08 '17 23:12 amehta3000

Hi Jason, just wondering if the final solution is to go straight markdown and assume that there is no formatting at all on a SFB mac client. Markdown doesn't really render in Mac OS. It just end up being simple text.

Do you have any insight on how to issue a line break?
We've been using \n\n\u200C<br\> but honestly, that looks very hacky and not ideal results. How do you programmatically get line breaks, when markdown says it is end a line with two or more spaces, then type return thx.

amehta3000 avatar Dec 19 '17 20:12 amehta3000

@amehta3000 The Only way I know a line break works for sure across all channels is using "\n\n"

JasonSowers avatar Dec 20 '17 18:12 JasonSowers

waiting for update , facing same issue , any Updates on it?

ganesh1190 avatar Jan 03 '18 09:01 ganesh1190

No updates. Was recommended to just go straight markdown, but as you may already know the SFB client on Mac doesn’t seem to even render markdown bold or italics either. Wondering if there will ever be an update or if there is an intention to make it better.

On Jan 3, 2018, at 1:37 AM, ganesh1190 [email protected] wrote:

waiting for update , facing same issue , any Updates on it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

amehta3000 avatar Jan 03 '18 13:01 amehta3000

Need only BOLD and ITALIC. Any idea...? Please share.

ganesh1190 avatar Jan 19 '18 10:01 ganesh1190

Like @ganesh1190 mention the same requirement on SFB.

@amehta3000 I would like to consult you, "\n\n" it's working to break the link for the SFB on windows? @JasonSowers I test it "\n\n" it's working to break the link on the SFB on windows. Any idea?

band888888 avatar Feb 11 '18 01:02 band888888

Any update on this, markdown is not at all rendering to Mac OS devices. I am trying to use link tag but it's not working.

deepankar27 avatar Mar 13 '18 19:03 deepankar27