Q:

Jade(PUG) to Handlebars, Helper function for loading SVG image Issue

I am converting a pug project to handlebars.
The problem is, it loads markup text instead of the image. But this works fine with pug(jade).
I wrote the helper function inside my helper.js file as follows.
const fs = require('fs');
exports.icon = (name) => fs.readFileSync(`./public/images/icons/${name}.svg`);

I am calling this function inside main.hbs file 
 {{icon 'logo'}}

How to solve this problem and render the image to the DOM instead of markup text?

A:

Try to use "triple-stash" {{{icon 'logo'}}}. See https://handlebarsjs.com/#html-escaping 

