Skip to content

danog\MadelineProto\WebUI\SafeHtml: A trusted HTML fragment, output as-is by templates instead of being escaped.

Back to index

Author: Daniil Gentili daniil@daniil.it

A trusted HTML fragment, output as-is by templates instead of being escaped.

Only wrap markup that does not contain user input.

Properties

  • $html: string

Method list:

Methods:

__construct(string $html)

Parameters:

  • $html: string

escape(string $text): \danog\MadelineProto\WebUI\SafeHtml

Escape a plain string into a safe HTML fragment.

Parameters:

  • $text: string

linkify(string $text): \danog\MadelineProto\WebUI\SafeHtml

Escape a plain string, turning the URLs it contains into links.

Parameters:

  • $text: string

jsonSerialize(): array

Serialized as {"html": "..."}, to tell it apart from plain text.


Generated by danog/phpdoc