Markdown

aiogram.utils.markdown.quote_html(*content, sep=' ')[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=' ')[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=' ')[source]

Make bold text (Markdown)

Parameters
  • content

  • sep

Returns

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

Make bold text (HTML)

Parameters
  • content

  • sep

Returns

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

Make italic text (Markdown)

Parameters
  • content

  • sep

Returns

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

Make italic text (HTML)

Parameters
  • content

  • sep

Returns

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

Make mono-width text (Markdown)

Parameters
  • content

  • sep

Returns

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

Make mono-width text (HTML)

Parameters
  • content

  • sep

Returns

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

Make mono-width text block (Markdown)

Parameters
  • content

  • sep

Returns

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

Make mono-width text block (HTML)

Parameters
  • content

  • sep

Returns

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

Make underlined text (Markdown)

Parameters
  • content

  • sep

Returns

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

Make underlined text (HTML)

Parameters
  • content

  • sep

Returns

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

Make strikethrough text (Markdown)

Parameters
  • content

  • sep

Returns

aiogram.utils.markdown.hstrikethrough(*content, sep=' ')[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