You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ag...@apache.org on 2005/07/06 01:58:40 UTC
svn commit: r209358 -
/incubator/roller/trunk/src/org/roller/presentation/velocity/PageHelper.java
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 **/