ktlili      2005/08/23 14:24:17 CEST

  Modified files:
    .                    MavenAutoUpdated.library 
    war                  project.properties 
    war/src/java/org/jahia/clipbuilder/html/util DomUtilities.java 
                                                 StringUtilities.java 
    war/src/java/org/jahia/clipbuilder/html/web/html/Impl 
                                                          
DefaultHTMLParser.java 
  Log:
  - fix encoding bug: eg.:  &gt replace whith &gt
  
  Revision  Changes    Path
  1.8       +13 -1     webclip_builder/MavenAutoUpdated.library
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/webclip_builder/MavenAutoUpdated.library.diff?r1=1.7&r2=1.8&f=h
  1.8       +0 -1      webclip_builder/war/project.properties
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/webclip_builder/war/project.properties.diff?r1=1.7&r2=1.8&f=h
  1.2       +1 -1      
webclip_builder/war/src/java/org/jahia/clipbuilder/html/util/DomUtilities.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/webclip_builder/war/src/java/org/jahia/clipbuilder/html/util/DomUtilities.java.diff?r1=1.1&r2=1.2&f=h
  1.2       +23 -19    
webclip_builder/war/src/java/org/jahia/clipbuilder/html/util/StringUtilities.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/webclip_builder/war/src/java/org/jahia/clipbuilder/html/util/StringUtilities.java.diff?r1=1.1&r2=1.2&f=h
  1.2       +4 -1      
webclip_builder/war/src/java/org/jahia/clipbuilder/html/web/html/Impl/DefaultHTMLParser.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/webclip_builder/war/src/java/org/jahia/clipbuilder/html/web/html/Impl/DefaultHTMLParser.java.diff?r1=1.1&r2=1.2&f=h
  
  
  
  Index: MavenAutoUpdated.library
  ===================================================================
  RCS file: /home/cvs/repository/webclip_builder/MavenAutoUpdated.library,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- MavenAutoUpdated.library  23 Aug 2005 07:07:55 -0000      1.7
  +++ MavenAutoUpdated.library  23 Aug 2005 12:24:16 -0000      1.8
  @@ -5,11 +5,16 @@
     <class>
       <path>../../Documents and 
Settings/jahia/.maven/repository/jdom/jars/jdom-1.0.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/ecs/jars/ecs-1.4.2.jar</path>
  +    <path>../../Documents and 
Settings/jahia/.maven/repository/commons-beanutils/jars/commons-beanutils-1.7.0.jar</path>
  +    <path>../../Documents and 
Settings/jahia/.maven/repository/commons-collections/jars/commons-collections-3.1.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/commons-digester/jars/commons-digester-1.5.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/log4j/jars/log4j-1.2.8.jar</path>
  +    <path>../../Documents and 
Settings/jahia/.maven/repository/commons-logging/jars/commons-logging-1.0.4.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/mysql/jars/mysql-connector-java-3.1.7-bin.jar</path>
  +    <path>../../Documents and 
Settings/jahia/.maven/repository/hsqldb/jars/hsqldb-1.7.1.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/servletapi/jars/servletapi-2.3.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/portlet-api/jars/portlet-api-1.0.jar</path>
  +    <path>../../Documents and 
Settings/jahia/.maven/repository/struts/jars/struts-1.2.2.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/sax/jars/sax-2.0.1.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/hibernate/jars/hibernate3-3.0.5.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/antlr/jars/antlr-2.7.5H3.jar</path>
  @@ -17,11 +22,16 @@
       <path>../../Documents and 
Settings/jahia/.maven/repository/cglib/jars/cglib-2.1.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/hibernate/jars/asm-3.0.5.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/jaxen/jars/jaxen-1.0-FCS-full.jar</path>
  +    <path>../../Documents and 
Settings/jahia/.maven/repository/dom4j/jars/dom4j-1.5.2.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/ehcache/jars/ehcache-1.1.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/junit/jars/junit-3.8.1.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/junitperf/jars/junitperf-1.8.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/commons-jelly/jars/commons-jelly-1.0-RC1.jar</path>
  +    <path>../../Documents and 
Settings/jahia/.maven/repository/commons-jelly/jars/commons-jelly-tags-log-1.0.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/commons-jelly/jars/commons-jelly-tags-xml-1.0.jar</path>
  +    <path>../../Documents and 
Settings/jahia/.maven/repository/commons-jelly/jars/commons-jelly-tags-junit-1.0.jar</path>
  +    <path>../../Documents and 
Settings/jahia/.maven/repository/commons-jexl/jars/commons-jexl-1.0.jar</path>
  +    <path>../../Documents and 
Settings/jahia/.maven/repository/commons-cli/jars/commons-cli-1.0.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/jaxen/jars/jaxen-1.0-FCS-full.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/saxpath/jars/saxpath-1.0-FCS.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/commons-lang/jars/commons-lang-2.0.jar</path>
  @@ -29,8 +39,10 @@
       <path>../../Documents and 
Settings/jahia/.maven/repository/gsbase/jars/gsbase-2.0.1.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/rhino/jars/js-1.6R1.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/xerces/jars/xercesImpl-2.6.2.jar</path>
  +    <path>../../Documents and 
Settings/jahia/.maven/repository/xalan/jars/xalan-2.6.0.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/xml-apis/jars/xml-apis-2.0.2.jar</path>
  +    <path>../../Documents and 
Settings/jahia/.maven/repository/nekohtml/jars/nekohtml-0.9.4.jar</path>
       <path>../../Documents and 
Settings/jahia/.maven/repository/commons-io/jars/commons-io-1.0.jar</path>
     </class>
  -  <lastmodsaved>1124713600875</lastmodsaved>
  +  <lastmodsaved>1124795845228</lastmodsaved>
   </library>
  
  
  
  Index: project.properties
  ===================================================================
  RCS file: /home/cvs/repository/webclip_builder/war/project.properties,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- project.properties        17 Aug 2005 08:54:34 -0000      1.7
  +++ project.properties        23 Aug 2005 12:24:16 -0000      1.8
  @@ -1,5 +1,4 @@
   maven.jahiapackage.deploy.context.name=clipBuilder
  -maven.uberjar.main = no
   maven.jar.excludes = **/struts/*
   
   maven.multiproject.type=war
  
  
  
  Index: DomUtilities.java
  ===================================================================
  RCS file: 
/home/cvs/repository/webclip_builder/war/src/java/org/jahia/clipbuilder/html/util/DomUtilities.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DomUtilities.java 28 Jul 2005 09:26:52 -0000      1.1
  +++ DomUtilities.java 23 Aug 2005 12:24:16 -0000      1.2
  @@ -96,7 +96,7 @@
                        s.flush();
                        //logger.debug("[ Result: " + s + " ]");
                        String res = s.toString();
  -                     //  res = StringUtilities.replaceSpecialGraphics(res);
  +                     res = StringUtilities.replaceSpecialGraphics(res);
                        return res;
                }
   
  
  
  
  Index: StringUtilities.java
  ===================================================================
  RCS file: 
/home/cvs/repository/webclip_builder/war/src/java/org/jahia/clipbuilder/html/util/StringUtilities.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StringUtilities.java      28 Jul 2005 09:26:52 -0000      1.1
  +++ StringUtilities.java      23 Aug 2005 12:24:16 -0000      1.2
  @@ -47,7 +47,6 @@
   
   
   
  -
        /**
         *  Compute Levenshtein distance
         *
  @@ -125,27 +124,34 @@
                if (s == null) {
                        return null;
                }
  +             /*
  +              *  Object[][] specialGraphic = {
  +              *  {
  +              *  "&lt;", "<"}
  +              *  , {
  +              *  "&gt;", ">"}
  +              *  , {
  +              *  "&amp;", "&"}
  +              *  , {
  +              *  "&quot;", "\""}
  +              *  , {
  +              *  "&nbsp;", " "}
  +              *  , {
  +              *  "&reg;", ""}
  +              *  , {
  +              *  "&copy;", ""}
  +              *  , {
  +              *  "&ensp;", ""}
  +              *  , {
  +              *  "&emsp", ""}
  +              *  };
  +              */
                Object[][] specialGraphic = {
                                {
  -                             "&lt;", "<"}
  -                             , {
  -                             "&gt;", ">"}
  -                             , {
                                "&amp;", "&"}
  -                             , {
  -                             "&quot;", "\""}
  -                             , {
  -                             "&nbsp;", " "}
  -                             , {
  -                             "&reg;", ""}
  -                             , {
  -                             "&copy;", ""}
  -                             , {
  -                             "&ensp;", ""}
  -                             , {
  -                             "&emsp", ""}
                                };
   
  +
                for (int i = 0; i < specialGraphic.length; i++) {
                        s = s.replaceAll((String) specialGraphic[i][0],
                                        (String) specialGraphic[i][1]);
  @@ -243,6 +249,4 @@
        }
   
   
  -
  -
   }
  
  
  
  Index: DefaultHTMLParser.java
  ===================================================================
  RCS file: 
/home/cvs/repository/webclip_builder/war/src/java/org/jahia/clipbuilder/html/web/html/Impl/DefaultHTMLParser.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultHTMLParser.java    28 Jul 2005 09:26:55 -0000      1.1
  +++ DefaultHTMLParser.java    23 Aug 2005 12:24:16 -0000      1.2
  @@ -92,10 +92,13 @@
                
configuration.setProperty("http://cyberneko.org/html/properties/names/elems";, 
"lower");
                
configuration.setFeature("http://cyberneko.org/html/features/report-errors";, 
false);
                
configuration.setFeature("http://cyberneko.org/html/features/balance-tags/ignore-outside-content";,
 false);
  +               // 
configuration.setFeature("http://apache.org/xml/features/scanner/notify-char-refs";,
 true);
  +                
configuration.setFeature("http://apache.org/xml/features/scanner/notify-builtin-refs";,
 false);
  +                
//configuration.setFeature("http://cyberneko.org/html/features/scanner/notify-builtin-refs";,
 true);
  +
                //script and css: remove <!-- --> due to encoding problem whith 
xerces and jdom
                
configuration.setFeature("http://cyberneko.org/html/features/scanner/script/strip-comment-delims";,
 true);
                
configuration.setFeature("http://cyberneko.org/html/features/scanner/style/strip-comment-delims";,
 true);
  -             
configuration.setFeature("http://apache.org/xml/features/scanner/notify-builtin-refs";,
 true);
                   // Deal whith namespace
                   
configuration.setFeature("http://xml.org/sax/features/namespaces";, false);
                   
configuration.setFeature("http://cyberneko.org/html/features/insert-namespaces";,
 false);
  

Reply via email to