happyday0416 / google-code-prettify

Automatically exported from code.google.com/p/google-code-prettify
Apache License 2.0
0 stars 0 forks source link

non escaped brackets [....] get converted to links... how to disable that? #286

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. using <pre> tag with class= prettyprint and lang-php though doesn't seem to 
matter
2. most html escape/encoding libs, etc don't consider these characters needing 
to be escaped
3. pretty print converts these to links

(Please include HTML, not just your source code)
<pre class="prettyprint lang-php">
loginId: ".$decodedApiResponse['response']['data']['userData']['loginId']."
</pre>

What is the expected output? 
$decodedApiResponse['response']['data']['userData']['loginId']

 What do you see instead?
$decodedApiResponse<a href="'response'" target="_blank">[1]</a><a href="'data'" 
target="_blank">[2]</a><a href="'userData'" target="_blank">[3]</a><a 
href="'loginId'" target="_blank">[4]</a>

What version are you using?  On what browser?
https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js

Please provide any additional information below.
If I escape the brackets... then it doesn't try to convert those to links...
$decodedApiResponse&#91;"response"&#93;&#91;"data"&#93;&#91;"userData"&#93;&#91;
"loginId"&#93;

Wondering if there was a way to disable this link conversion.

Original issue reported on code.google.com by kur...@gmail.com on 14 May 2013 at 5:29

GoogleCodeExporter commented 8 years ago
Prettify doesn't do this.  Are you sure your HTML isn't being passed through a 
wikitext to HTML converter?

Original comment by mikesamuel@gmail.com on 15 May 2013 at 8:39

GoogleCodeExporter commented 8 years ago
yeah, I am an idiot... this was in a content spot looking for wikitext

Original comment by kur...@gmail.com on 15 May 2013 at 10:13

GoogleCodeExporter commented 8 years ago
Cool.  I'm glad you found your problem.

Original comment by mikesamuel@gmail.com on 22 May 2013 at 1:10