escape_markup 1.0.0-dev.1 escape_markup: ^1.0.0-dev.1 copied to clipboard
Escape a string for use in HTML or the inverse.
Escape a string for use in HTML or the inverse
Install #
$ dart pub add escape_markup
With Flutter:
$ flutter pub add escape_markup
Usage #
import 'package:escape_markup/escape_markup.dart';
void main(List<String> arguments) {
print(escapeMp('👻 & 👻'));
// 👻 & 👻
print(unEscapeMp('👻 & 👻'));
// => 👻 & 👻
print(escapeMp('Hello <em>World</em>'));
// => Hello <em>World</em>
const escapedUrl = 'https://shan-shaji.github.io?x="👻"';
print(unEscapeMp(escapedUrl));
// => https://shan-shaji.github.io?x="👻"
print(unEscapeMp('Hello <em>World</em>'));
// => Hello <em>World</em>
}