2

I'm working on my first project which involves an API.

The API I'm working with gives me strings like:

"In our nation’s capital, killings have risen by 50 percent."

Is there a way I can simply convert the codes into characters? or do I need to call gsub over and over again?

Deepak Mahakale
  • 22,834
  • 10
  • 68
  • 88
Jones
  • 1,154
  • 1
  • 10
  • 35

1 Answers1

1

In Ruby On Rails you can try below line it display well HTML

<%="&quot;In our nation&rsquo;s capital, killings have risen by 50 percent.&quot;".html_safe%>

It will output like: "In our nation’s capital, killings have risen by 50 percent."

Dhiraj
  • 1,119
  • 1
  • 13
  • 23