escape_markup 1.0.0-dev.1 copy "escape_markup: ^1.0.0-dev.1" to clipboard
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('👻 & 👻'));
  // 👻 &amp; 👻

  print(unEscapeMp('👻 &amp; 👻'));
  // => 👻 & 👻

  print(escapeMp('Hello <em>World</em>'));
  // => Hello &lt;em&gt;World&lt;/em&gt;

  const escapedUrl = 'https://shan-shaji.github.io?x=&quot;👻&quot;';

  print(unEscapeMp(escapedUrl));
  // => https://shan-shaji.github.io?x="👻"

  print(unEscapeMp('Hello &lt;em&gt;World&lt;/em&gt;'));
  // => Hello <em>World</em>
}

0
likes
110
pub points
0%
popularity

Publisher

unverified uploader

Escape a string for use in HTML or the inverse.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (LICENSE)

More

Packages that depend on escape_markup