roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r209358 - /incubator/roller/trunk/src/org/roller/presentation/velocity/PageHelper.java
Date Tue, 05 Jul 2005 23:58:40 GMT
Author: agilliland
Date: Tue Jul  5 16:58:38 2005
New Revision: 209358

URL: http://svn.apache.org/viewcvs?rev=209358&view=rev
Log:
Disabled old evaluateString() method.  Too dangerous.  The method still works, but we don't
actually pass the contents into velocity anymore.

Modified:
    incubator/roller/trunk/src/org/roller/presentation/velocity/PageHelper.java

Modified: incubator/roller/trunk/src/org/roller/presentation/velocity/PageHelper.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/velocity/PageHelper.java?rev=209358&r1=209357&r2=209358&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/velocity/PageHelper.java (original)
+++ incubator/roller/trunk/src/org/roller/presentation/velocity/PageHelper.java Tue Jul  5
16:58:38 2005
@@ -168,25 +168,16 @@
     
     /**
      * Evaluates the String as a Velocimacro, returning the results.
+     *
+     * @deprecated shouldn't be used anymore because it's dangerous
      * 
      * @param str String
      * @return String
      */
     public String evaluateString(String str)
     {
-        if (mVelocityContext == null) return str;
-        
-        StringWriter sw = new StringWriter();
-        try
-        {
-            Velocity.evaluate( mVelocityContext, sw, "evalStr", str );
-            return sw.toString();
-        }
-        catch (Exception e)
-        {
-            mLogger.warn("VelocityHelper.evaluateString()", e);
-        }
-        return "";
+        // we no longer allow users to do this because it is dangerous
+        return str;
     }
    
     /** Build the URL for editing an WeblogEntry **/



Mime
View raw message