代码之家  ›  专栏  ›  技术社区  ›  Vijay

降价url中的hypen breaking url-webchat botframework

  •  0
  • Vijay  · 技术社区  · 7 年前

    我有一个网址,其中包含一个炒作。这个hypen破坏了url的显示方式,并且不允许url以如下所示的标记格式正确显示

    HTML

    Please  <a href="https://abcd.service-now.com" target="_blank"> click here </a> to view RITM details on Service Now.
    

    降价

    请[点击此处]( https://abcd.service- now.com)查看RITM 关于现在服务的详细信息。

    我通常从常量生成链接并将其转换为html锚标记,然后使用html2text将其转换为markdown。我该怎么做才能不让url被拆分,以便在markdown中正确显示它。降价用于在bot框架web聊天控件上显示

    1 回复  |  直到 7 年前
        1
  •  1
  •   Gary Liu    7 年前

    您可以尝试在python的botbuilder中直接发送标记格式字符串。也支持webchat Channel Inspector .

    我有一个hypen链接的测试,它在我这边工作得很好。

    def __create_reply_activity(request_activity):
            return Activity(
                type=ActivityTypes.message,
                channel_id=request_activity.channel_id,
                conversation=request_activity.conversation,
                recipient=request_activity.from_property,
                from_property=request_activity.recipient,
                text='[Click here](https://bing-well.com)',
                service_url=request_activity.service_url)
    

    enter image description here