Skip to content

Escaped special chars in Android have incorrect rendering  #187

Description

@yhatt

I've found that escaping special character through the fallback text of date formatting is not work correctly in Slack client for Android.

<Blocks>
  <Section>&gt; *bold* _italic_ ~strikethrough~ `code`</Section>
  <Section>
    <Escape>&gt; *bold* _italic_ ~strikethrough~ `code`</Escape>
  </Section>
</Blocks>
[
  {
    "type": "section",
    "text": {
      "type": "mrkdwn",
      "text": "&gt; *bold* _italic_ ~strikethrough~ `code`",
      "verbatim": true
    }
  },
  {
    "type": "section",
    "text": {
      "type": "mrkdwn",
      "text": "­&gt; <!date^00000000^{_}|*>bold<!date^00000000^{_}|*> <!date^00000000^{_}|_>italic<!date^00000000^{_}|_> <!date^00000000^{_}|~>strikethrough<!date^00000000^{_}|~> <!date^00000000^{_}|`>code<!date^00000000^{_}|`>",
      "verbatim": true
    }
  }
]

PC / Web

スクリーンショット 2020-08-01 3 33 26

iOS

Android

Android does not fallback into escaped character and always renders an invalid date format {_}.

We don't want to escape characters by implicit Unicode injection because a copied message would include magic characters that hard to notice by user. (#124) However, I think there is no other way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions