Markdown

aiogram.utils.markdown.quote_html(*content, sep=' ') str[source]

Quote HTML symbols

All <, >, & and ” symbols that are not a part of a tag or an HTML entity must be replaced with the corresponding HTML entities (< with &lt; > with &gt; & with &amp and ” with &quot).

Parameters
  • content

  • sep

Returns

aiogram.utils.markdown.escape_md(*content, sep=' ') str[source]

Escape markdown text

E.g. for usernames

Parameters
  • content

  • sep

Returns

aiogram.utils.markdown.text(*content, sep=' ')[source]

Join all elements with a separator

Parameters
  • content

  • sep

Returns

aiogram.utils.markdown.bold(*content, sep=' ') str[source]

Make bold text (Markdown)

Parameters
  • content

  • sep

Returns

aiogram.utils.markdown.hbold(*content, sep=' ') str[source]

Make bold text (HTML)

Parameters
  • content

  • sep

Returns

aiogram.utils.markdown.italic(*content, sep=' ') str[source]

Make italic text (Markdown)

Parameters
  • content

  • sep

Returns

aiogram.utils.markdown.hitalic(*content, sep=' ') str[source]

Make italic text (HTML)

Parameters
  • content

  • sep

Returns

aiogram.utils.markdown.spoiler(*content, sep=' ') str[source]

Make spoiler text (Markdown)

Parameters
  • content

  • sep

Returns

aiogram.utils.markdown.hspoiler(*content, sep=' ') str[source]

Make spoiler text (HTML)

Parameters
  • content

  • sep

Returns

aiogram.utils.markdown.code(*content, sep=' ') str[source]

Make mono-width text (Markdown)

Parameters
  • content

  • sep

Returns

aiogram.utils.markdown.hcode(*content, sep=' ') str[source]

Make mono-width text (HTML)

Parameters
  • content

  • sep

Returns

aiogram.utils.markdown.pre(*content, sep='\n') str[source]

Make mono-width text block (Markdown)

Parameters
  • content

  • sep

Returns

aiogram.utils.markdown.hpre(*content, sep='\n') str[source]

Make mono-width text block (HTML)

Parameters
  • content

  • sep

Returns

aiogram.utils.markdown.underline(*content, sep=' ') str[source]

Make underlined text (Markdown)

Parameters
  • content

  • sep

Returns

aiogram.utils.markdown.hunderline(*content, sep=' ') str[source]

Make underlined text (HTML)

Parameters
  • content

  • sep

Returns

aiogram.utils.markdown.strikethrough(*content, sep=' ') str[source]

Make strikethrough text (Markdown)

Parameters
  • content

  • sep

Returns

aiogram.utils.markdown.hstrikethrough(*content, sep=' ') str[source]

Make strikethrough text (HTML)

Parameters
  • content

  • sep

Returns

Format URL (Markdown)

Parameters
  • title

  • url

Returns

Format URL (HTML)

Parameters
  • title

  • url

Returns

Hide URL (HTML only) Can be used for adding an image to a text message

Parameters

url

Returns