Open
Description
I have html string like this:
var html = '<div class="content" data-content="Some text. <a href="https://google.com/" target="_blank" class="external">Google!</a>">internal text</div>'
It has data-content
attribute which contains <
, >
and "
.
The output is:
<div className="content" data-content="Some text. <a href="https://google.com/" target="_blank" class="external">Google!</a>">internal text</div>
But it's not a valid jsx code.
I uses this fork to handle such case:
xcv58@ed12343
But I'm not sure whether it's correct way.
Activity
kasbah commentedon Aug 12, 2016
I am having a similar problem with
{
and}
characters.