Skip to main content

apiverve_htmlentities 1.2.5 copy "apiverve_htmlentities: ^1.2.5" to clipboard
apiverve_htmlentities: ^1.2.5 copied to clipboard

HTML Entities Encoder/Decoder converts special characters into safe HTML entities or restores encoded strings back to standard text. Pass any HTML markup or text snippet to receive the converted strin [...]

HTML Entities Encoder/Decoder API - Dart/Flutter Client #

HTML Entities Encoder/Decoder converts special characters into safe HTML entities or restores encoded strings back to standard text. Pass any HTML markup or text snippet to receive the converted string, a replacement count, and a list of modified characters.

pub package License: MIT

This is the Dart/Flutter client for the HTML Entities Encoder/Decoder API.

Installation #

Add this to your pubspec.yaml:

dependencies:
  apiverve_htmlentities: ^1.2.5

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage #

import 'package:apiverve_htmlentities/apiverve_htmlentities.dart';

void main() async {
  final client = HtmlentitiesClient('YOUR_API_KEY');

  try {
    final response = await client.execute({
      'html': '<div class="test">Hello & World</div>',
      'action': 'encode'
    });

    print('Status: ${response.status}');
    print('Data: ${response.data}');
  } catch (e) {
    print('Error: $e');
  }
}

Response #

{
  "status": "ok",
  "error": null,
  "data": {
    "action": "encode",
    "original": "<div class=\"test\">Hello & World</div>",
    "encoded": "&lt;div class=&quot;test&quot;&gt;Hello &amp; World&lt;&#x2F;div&gt;",
    "entities_replaced": [
      "<",
      "\"",
      ">",
      "&",
      "/"
    ],
    "count": 8
  }
}

API Reference #

Authentication #

All requests require an API key. Get yours at apiverve.com.

License #

MIT License - see LICENSE for details.


Built with Dart for APIVerve

0
likes
130
points
1.1k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

HTML Entities Encoder/Decoder converts special characters into safe HTML entities or restores encoded strings back to standard text. Pass any HTML markup or text snippet to receive the converted string, a replacement count, and a list of modified characters.

Homepage
Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

http, http_parser

More

Packages that depend on apiverve_htmlentities