jacktuck / unfurl

Metadata scraper with support for oEmbed, Twitter Cards and Open Graph Protocol for Node.js :zap:
MIT License
474 stars 51 forks source link

TypeError [ERR_UNESCAPED_CHARACTERS]: Request path contains unescaped characters #83

Closed nisaji closed 2 years ago

nisaji commented 2 years ago

When I use with URL contains Double Byte Character (for example: Japanese), returns error as Title.

Reproduction of the problem

<!---OK--> 
http://localhost:3000/api/ogp?url=http://affiliweb.info/office/
<!---NG (URL with Double Byte Character)--> 
http://localhost:3000/api/ogp?url=http://affiliweb.info/日本語urlってどうよ?/
<!---NG (URL with encoded Double Byte Character)--> 
http://localhost:3000/api/ogp?url=http://affiliweb.info/%E6%97%A5%E6%9C%AC%E8%AA%9Eurl%E3%81%A3%E3%81%A6%E3%81%A9%E3%81%86%E3%82%88%EF%BC%9F/

Each addresses are accessible via browser now.

jacktuck commented 2 years ago

Can you try now on this branch fix/input-url-encoding?

nisaji commented 2 years ago

Thank you. After installing this branch with yarn add https://github.com/jacktuck/unfurl.git#fix/input-url-encoding, I encountered code: 'MODULE_NOT_FOUND' when I use unfurl by import { unfurl } from 'unfurl.js'. Reinstalling node_modules with yarn not fixed this error.

nisaji commented 2 years ago

Installing master branch with yarn add unfurl.jsworks like before.

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 5.6.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: