JPeer264 / node-rcs-core

Rename css selectors across all files
MIT License
37 stars 7 forks source link

html parsing problem #50

Closed Aliaksandr-Padabed closed 6 years ago

Aliaksandr-Padabed commented 6 years ago

html:

<p class="cl1">text with 'single quote</p>
...
<p class="cl1">another s'ingle quote</p>

js:

rcs.replace.any(html);

result:

"cl1|single quote</p>...<p class="cl1">another s"
JPeer264 commented 6 years ago

Hey @Aliaksandr-Padabed, thanks for your issue.

Oh, that should not happen. I'm gonna investigate this tomorrow.

JPeer264 commented 6 years ago

@Aliaksandr-Padabed I published now a new function for HTML. Can you try rcs.replace.html?

For now this function just replaces class and id attributes, but I will add more attributes soon (ref: #53).

If this or another error still exists please open a new issue.

Aliaksandr-Padabed commented 6 years ago

@JPeer264 thanks for quick response, will try soon.