akhoury / nodebb-plugin-sanitizehtml

a nodebb plugin that sanitizes html content
MIT License
2 stars 7 forks source link

<img src= TO ![alt text](image url) #16

Open amosin opened 4 years ago

amosin commented 4 years ago

Hi There,

Is it possible with this plugin to sanitize the HTML image sources (<img src=) to display on the post?

I have an example that I am reading RSS feed and I get this answer:

<img src="https://s3.amazonaws.com/nsr-production/photos/attachments/cc0bfa600b39fd2a40bdc009cfb0fa17e4909d84.jpg?1576978296" class="ff-og-image-inserted">

That doesn't get posted into the post... only if I replace with the following:

![alt text](https://s3.amazonaws.com/nsr-production/photos/attachments/cc0bfa600b39fd2a40bdc009cfb0fa17e4909d84.jpg?1576978296) Thanks!

Andre

akhoury commented 4 years ago

sounds like you need to convert html-to-markdown... Not really this plugin's job

probably best to do it on RSS pulling, how are you pulling the rss feed?