Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 74406

How to use Nokogiri::HTML.fragment without creating unwanted custom tags

$
0
0

I have Ruby code that supports HTML fragmentation with Nokogiri.

When user input text with "<" to the application, Nokogiri::HTML.fragment make it to the custom HTML tag.

If a user enters text like

"One <two three"

the application will display it like

"one <two three></two>"

I'm using Nokogiri::HTML.fragment(html, encoding = 'UTF-8').

Does anyone know how to fix it?


Viewing all articles
Browse latest Browse all 74406

Latest Images

Trending Articles



Latest Images

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