Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 1.08 KB

README.md

File metadata and controls

46 lines (35 loc) · 1.08 KB

HTML body renderer demo

Some web services (e.g. Twitter) will not render properly if their embedded code is used as a data URI within a web view. This api will receive the HTML and render a proper web page to help with that. It supports both GET and POST request to accommodate large input.

No validation is being done so it is intentionally open to cross-site scripting attacks and friends.

Originally from daohoangson/flutter_widget_from_html@8a61402.

GET request

curl https://demo-body-renderer.vercel.app\?body=hello

Output:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
</head>
<body>hello</body>
</html>

POST request

curl https://demo-body-renderer.vercel.app -d body=lorem+lipsum

Output

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
</head>
<body>lorem lipsum</body>
</html>