Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

He.decode : keep some part encoded #54

Closed
mvuidev opened this issue Apr 5, 2017 · 1 comment
Closed

He.decode : keep some part encoded #54

mvuidev opened this issue Apr 5, 2017 · 1 comment

Comments

@mvuidev
Copy link

mvuidev commented Apr 5, 2017

Hi,

Using he.decode, I need to keep a part of the code encoded. Is it possible ?

For example, I do he.encode on :

<h1>Title</h1>
<pre>
<p>Code</p>
</pre>

So I get :

&lt;h1&gt;Title&lt;/h1&gt;
&lt;pre&gt;
&lt;p&gt;Code&lt;/p&gt;
&lt;/pre&gt;

And here is what I need to get doing a he.decode :

<h1>Title</h1>
<pre>
&lt;p&gt;Code&lt;/p&gt;
</pre>
@mathiasbynens
Copy link
Owner

You’ll have to handle that yourself, outside of he. Parse the HTML and only encode/decode the parts you’re interested in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants