Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Over-escape for URL and time format is triggered by styling and <Escape> #118

Closed
yhatt opened this issue Mar 6, 2020 · 0 comments · Fixed by #120
Closed

Over-escape for URL and time format is triggered by styling and <Escape> #118

yhatt opened this issue Mar 6, 2020 · 0 comments · Fixed by #120
Labels
bug Something isn't working

Comments

@yhatt
Copy link
Owner

yhatt commented Mar 6, 2020

<Escape> and format with corresponded special characters will break URL and time format by over-escaping.

<Blocks>
  <Section>
    <p><a href="https://example.com/a_b_c">link</a></p>
    <p><time datetime={1234567890} fallback="fail">{date} {time_secs}</time></p>
  </Section>
  <Section>
    <Escape>
      <p><a href="https://example.com/a_b_c">link</a></p>
      <p><time datetime={1234567890} fallback="fail">{date} {time_secs}</time></p>
    </Escape>
  </Section>
  <Section>
    <i>
      <p><a href="https://example.com/a_b_c">link</a></p>
      <p><time datetime={1234567890} fallback="fail">{date} {time_secs}</time></p>
    </i>
  </Section>
</Blocks>
{
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "<https://example.com/a_b_c|link>\n\n<!date^1234567890^{date} {time_secs}|fail>",
        "verbatim": true
      }
    },
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "<https://example.com/aˍbˍc|link>\n\n<!date^1234567890^{date} {timeˍsecs}|fail>",
        "verbatim": true
      }
    },
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "_<https://example.com/aˍbˍc|link>_\n\n_<!date^1234567890^{date} {timeˍsecs}|fail>_",
        "verbatim": true
      }
    }
  ]
}

URL in <a> link is broken by escaping, and <time> tag shows as fallback text.

<a> tag has a workaround: Move <Escape>/ styling element into the inside of <a> tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant