Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 4622

Ruby: Convert to newline URI encode

$
0
0

I want to share sometext on whatsapp so I'm converting html to text otherwise it displays all the tags.

Currently I'm using strip_tags to remove tags but that also removes breaks from the text. How do I convert html to text and convert breaks to newline characters and url encode the text.

currently I'm using following

@whatsapp_text = u strip_tags(@post.summary)

Viewing all articles
Browse latest Browse all 4622


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>