ShaneCunn / syntaxhighlighter

Automatically exported from code.google.com/p/syntaxhighlighter
GNU General Public License v3.0
0 stars 0 forks source link

XML Brush displays closed empty elements, makes elements lowercase #161

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
----------------
1. Setup an XML example, use an empty element such as <Test/>

What is the expected output? What do you see instead?
----------------
Expect to view the XML as it is, but instead there are tags added at the
bottom of the document example attempting to close these empty tags. Also
the case of the tags is set to lowercase.

What version of the product are you using? On what operating system?
----------------
Firefox 3.0.12, Windows XP. SyntaxHighlighter version 1.5.1

Please provide any additional information below.
===========================
Here is an example Document:
<?xml version="1.0" encoding="UTF-8"?>
<HotSheet>
  <test1>test1</test1>
  <test2/>
</HotSheet>
===========================
Here is the output:
<hotsheet>  
         <test1>test1</test1>  
         <test2>  
     </test2>  
</hotsheet>

Original issue reported on code.google.com by ja...@redconfetti.com on 28 Jul 2009 at 11:15

GoogleCodeExporter commented 8 years ago
We got the same problem too. Anyone looked into a solution?

Original comment by david.co...@gmail.com on 23 Jun 2010 at 1:25

GoogleCodeExporter commented 8 years ago
My concern is that all XML tags are turned to lower case

Original comment by louiz...@gmail.com on 23 Aug 2010 at 5:04

GoogleCodeExporter commented 8 years ago
Yes .. same issue .. for example : I use this to display actionscript code, 
which contains XML sometimes. For my app it is very important that xml stays 
case sensitive. The app is a code generation application so turning tags to 
lowercase is a definit fail.

Original comment by martijn....@gmail.com on 30 Aug 2010 at 8:50

GoogleCodeExporter commented 8 years ago
One way to keep the case sensitivity is to paste the XML in the visual tab.  
Then go to the HTML tab to add the <pre> tags around it.  However I found doing 
this removes the indenting, so it is not the best solution.

Original comment by christin...@gmail.com on 19 Sep 2010 at 5:56

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
See 
http://alexgorbatchev.com/SyntaxHighlighter/manual/installation.html

This feature is new in 2.1 SyntaxHighlighter looks for <script 
type="syntaxhighlighter" /> which have a specially formatted class attribute. 
The format of the attribute is the same as the CSS style attribute. The only 
required parameter is brush (see configuration), which should be set to as one 
of the brush aliases.

Here’s an example (Please note necessary CDATA tag):

Original comment by geo...@dawouds.com on 24 Nov 2010 at 6:32

GoogleCodeExporter commented 8 years ago
Any solution for case sensitive tags yet?

Original comment by nishant....@gmail.com on 19 Sep 2012 at 10:18

GoogleCodeExporter commented 8 years ago
Replace <pre with <script />  method - see this:
http://alexgorbatchev.com/SyntaxHighlighter/manual/installation.html

Not suitable for some uses, as stated in the installation guide

Original comment by Jachym.L...@gmail.com on 9 Oct 2012 at 8:56

GoogleCodeExporter commented 8 years ago
I've just found this problem as well. I've discovered that this is not a 
problem with the SyntaxHighlighter, but the browser. You need to encode HTML 
entities. All your "<" and ">" must be "<" and ">". If you use PHP to print the 
text simply use htmlentities($xmlText, ENT_COMPAT, 'UTF-8');

Original comment by templ...@gmail.com on 1 Aug 2014 at 7:30