morten      01/09/20 06:20:36

  Modified:    java/src/org/apache/xalan/xsltc/runtime TextOutput.java
  Log:
  Fix to prevent escaping of the '"' character. This character should only
  be escaped inside attribute values, and not in text nodes.
  PR:           bug 2952
  Obtained from:        n/a
  Submitted by: [EMAIL PROTECTED]
  Reviewed by:  [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.30      +5 -2      
xml-xalan/java/src/org/apache/xalan/xsltc/runtime/TextOutput.java
  
  Index: TextOutput.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/runtime/TextOutput.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- TextOutput.java   2001/09/19 12:08:26     1.29
  +++ TextOutput.java   2001/09/20 13:20:36     1.30
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: TextOutput.java,v 1.29 2001/09/19 12:08:26 morten Exp $
  + * @(#)$Id: TextOutput.java,v 1.30 2001/09/20 13:20:36 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -230,8 +230,8 @@
            _escapeChars = true;
        }
        else if (type == HTML) {
  -         _escapeChars = true;
            setIndent(true);
  +         _escapeChars = true;
        }
        setType(type);
       }
  @@ -298,6 +298,7 @@
        * CDATA sections in output XML documents.
        */
       public boolean setEscaping(boolean escape) throws TransletException {
  +
        // Set output type to XML (the default) if still unknown.
        if (_outputType == UNKNOWN) setTypeInternal(XML);
   
  @@ -376,11 +377,13 @@
                _saxHandler.characters(AMP, 0, AMP_length);
                offset = i + 1;
                break;
  +             /* Quotes should only be escaped inside attribute values
            case '"':
                _saxHandler.characters(ch, offset, i - offset);
                _saxHandler.characters(QUOTE, 0, QUOTE_length);
                offset = i + 1;
                break;
  +             */
            case '<':
                _saxHandler.characters(ch, offset, i - offset);
                _saxHandler.characters(LT, 0, LT_length);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to