Skip to content

This demo takes a HTML from input and renders directly without any validation.

Notifications You must be signed in to change notification settings

pierre-softimpact/demo-body-renderer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>

About

This demo takes a HTML from input and renders directly without any validation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%