I am using ckeditor to save posts content. If I save anything in my db then it saves content with html tags. To escape html i am using <%= raw(posts.content) %>
function. I am using Speak.js for adding functionality to listen posts content also. Here i am doing like this ...
<script src="speakClient.js"></script>
<img src="img/listenpost.png" alt="Listen Post" onclick="speak('<%= posts_item.content.html_safe %>')" style="cursor:pointer;" />
but here it speaks content with html tags. I tried to do like this also
speak('<%== posts_item.content %>') or speak('<%= raw posts_item.content %>')
But nothing works for me. How can I escape html tags so that my posts audible without HTML tags