Merge remote-tracking branch 'origin/helma-🐜' into renovate/major-jetty-packages
This commit is contained in:
commit
1e32c8eb89
21 changed files with 227 additions and 184 deletions
43
.github/workflows/release.yml
vendored
Normal file
43
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 21
|
||||
|
||||
- name: Set up Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew assembleDist
|
||||
|
||||
- name: Create release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release create "$GITHUB_REF_NAME" \
|
||||
--repo "$GITHUB_REPOSITORY" \
|
||||
--title "Helma $GITHUB_REF_NAME" \
|
||||
--generate-notes
|
||||
|
||||
- name: Upload assets
|
||||
run: |
|
||||
gh release upload "$GITHUB_REF_NAME" \
|
||||
build/distributions/helma-*.*
|
||||
--clobber
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## TL;DR
|
||||
|
||||
- Make sure you have Java 11 or higher installed
|
||||
- Make sure you have Java 17 or higher installed
|
||||
- Download and unpack the [latest release](https://github.com/antville/helma/releases)
|
||||
- Invoke `./bin/helma`, resp. `./bin/helma.bat`, depending on your platform
|
||||
- Direct your web browser to <http://localhost:8080>
|
||||
|
@ -21,9 +21,9 @@ Although Helma became a Grande Dame of server-side JavaScript already decades ag
|
|||
|
||||
## System Requirements
|
||||
|
||||
You need a Java virtual machine version 11 or higher to run Helma.
|
||||
You need a Java virtual machine version 17 or higher to run Helma.
|
||||
|
||||
Please consult the documentation of your platform how to obtain and install Java.
|
||||
Please consult the documentation of your platform on how to obtain and install Java.
|
||||
|
||||
You also can directly download a [Java runtime or development kit](https://www.oracle.com/java/technologies/javase-downloads.html#javasejdk) from Oracle.
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@ allprojects {
|
|||
apply plugin: 'java'
|
||||
|
||||
compileJava {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
|
|
@ -280,9 +280,9 @@ public class ResponseBean implements Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
* add an HTML formatted debug message to the end of the page.
|
||||
* add HTML formatted debug messages to the end of the page.
|
||||
*
|
||||
* @param message the message
|
||||
* @param messages the list of messages
|
||||
*/
|
||||
public void debug(String... messages) {
|
||||
if (messages == null) {
|
||||
|
|
|
@ -384,7 +384,7 @@ public final class ResponseTrans extends Writer implements Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Replace special characters with entities, including <, > and ", thus allowing
|
||||
* Replace special characters with entities, including {@code <}, {@code >} and {@code "}, thus allowing
|
||||
* no HTML tags.
|
||||
*/
|
||||
public synchronized void encode(Object what) {
|
||||
|
@ -415,7 +415,7 @@ public final class ResponseTrans extends Writer implements Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Replace special characters with entities, including <, > and ", thus allowing
|
||||
* Replace special characters with entities, including {@code <}, {@code >} and {@code "}, thus allowing
|
||||
* no HTML tags.
|
||||
*/
|
||||
public synchronized void encodeXml(Object what) {
|
||||
|
|
|
@ -192,7 +192,7 @@ public final class TypeManager {
|
|||
long lastScan = lastRepoScan.containsKey(repository) ?
|
||||
((Long) lastRepoScan.get(repository)).longValue() : 0;
|
||||
if (repository.lastModified() != lastScan) {
|
||||
lastRepoScan.put(repository, new Long(repository.lastModified()));
|
||||
lastRepoScan.put(repository, Long.valueOf(repository.lastModified()));
|
||||
checkRepository(repository, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -514,7 +514,7 @@ public class ImageWrapper {
|
|||
/**
|
||||
* Reduces the colors used in the image. Necessary before saving as GIF.
|
||||
*
|
||||
* @param colors colors the number of colors to use, usually <= 256.
|
||||
* @param colors colors the number of colors to use, usually {@literal <}= 256.
|
||||
*/
|
||||
public void reduceColors(int colors) {
|
||||
reduceColors(colors, false);
|
||||
|
@ -523,7 +523,7 @@ public class ImageWrapper {
|
|||
/**
|
||||
* Reduces the colors used in the image. Necessary before saving as GIF.
|
||||
*
|
||||
* @param colors colors the number of colors to use, usually <= 256.
|
||||
* @param colors colors the number of colors to use, usually {@literal <}= 256.
|
||||
* @param dither ...
|
||||
*/
|
||||
public void reduceColors(int colors, boolean dither) {
|
||||
|
@ -534,7 +534,7 @@ public class ImageWrapper {
|
|||
* Reduce the colors used in this image. Useful and necessary before saving
|
||||
* the image as GIF file.
|
||||
*
|
||||
* @param colors the number of colors to use, usually <= 256.
|
||||
* @param colors the number of colors to use, usually {@literal <}= 256.
|
||||
* @param dither ...
|
||||
* @param alphaToBitmask ...
|
||||
*/
|
||||
|
|
|
@ -76,13 +76,13 @@ public final class TransientProperty implements IProperty, Serializable {
|
|||
return svalue;
|
||||
|
||||
case BOOLEAN:
|
||||
return new Boolean(bvalue);
|
||||
return Boolean.valueOf(bvalue);
|
||||
|
||||
case INTEGER:
|
||||
return new Long(lvalue);
|
||||
return Long.valueOf(lvalue);
|
||||
|
||||
case FLOAT:
|
||||
return new Double(dvalue);
|
||||
return Double.valueOf(dvalue);
|
||||
|
||||
case DATE:
|
||||
return new Date(lvalue);
|
||||
|
|
|
@ -93,7 +93,7 @@ public final class Property implements IProperty, Serializable, Cloneable, Compa
|
|||
break;
|
||||
|
||||
case INTEGER:
|
||||
value = new Long(in.readLong());
|
||||
value = Long.valueOf(in.readLong());
|
||||
|
||||
break;
|
||||
|
||||
|
@ -103,7 +103,7 @@ public final class Property implements IProperty, Serializable, Cloneable, Compa
|
|||
break;
|
||||
|
||||
case FLOAT:
|
||||
value = new Double(in.readDouble());
|
||||
value = Double.valueOf(in.readDouble());
|
||||
|
||||
break;
|
||||
|
||||
|
@ -231,7 +231,7 @@ public final class Property implements IProperty, Serializable, Cloneable, Compa
|
|||
*/
|
||||
public void setIntegerValue(long l) {
|
||||
type = INTEGER;
|
||||
value = new Long(l);
|
||||
value = Long.valueOf(l);
|
||||
dirty = true;
|
||||
}
|
||||
|
||||
|
@ -242,7 +242,7 @@ public final class Property implements IProperty, Serializable, Cloneable, Compa
|
|||
*/
|
||||
public void setFloatValue(double d) {
|
||||
type = FLOAT;
|
||||
value = new Double(d);
|
||||
value = Double.valueOf(d);
|
||||
dirty = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ public class Transactor {
|
|||
public void registerConnection(DbSource src, Connection con) {
|
||||
sqlConnections.put(src, con);
|
||||
// we assume a freshly created connection is ok.
|
||||
testedConnections.put(src, new Long(System.currentTimeMillis()));
|
||||
testedConnections.put(src, Long.valueOf(System.currentTimeMillis()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -262,7 +262,7 @@ public class Transactor {
|
|||
stmt.execute("SELECT 1");
|
||||
}
|
||||
stmt.close();
|
||||
testedConnections.put(src, new Long(now));
|
||||
testedConnections.put(src, Long.valueOf(now));
|
||||
} catch (SQLException sx) {
|
||||
try {
|
||||
con.close();
|
||||
|
|
|
@ -225,9 +225,9 @@ public final class XmlDatabaseReader extends DefaultHandler implements XmlConsta
|
|||
prop.setStringValue(charValue);
|
||||
}
|
||||
} else if ("float".equals(elementType)) {
|
||||
prop.setFloatValue((new Double(charValue)).doubleValue());
|
||||
prop.setFloatValue((Double.valueOf(charValue)).doubleValue());
|
||||
} else if ("integer".equals(elementType)) {
|
||||
prop.setIntegerValue((new Long(charValue)).longValue());
|
||||
prop.setIntegerValue((Long.valueOf(charValue)).longValue());
|
||||
} else {
|
||||
prop.setStringValue(charValue);
|
||||
}
|
||||
|
|
|
@ -299,9 +299,9 @@ public final class XmlReader extends DefaultHandler implements XmlConstants {
|
|||
currentNode.setString(elementName, charValue);
|
||||
}
|
||||
} else if ("float".equals(elementType)) {
|
||||
currentNode.setFloat(elementName, (new Double(charValue)).doubleValue());
|
||||
currentNode.setFloat(elementName, (Double.valueOf(charValue)).doubleValue());
|
||||
} else if ("integer".equals(elementType)) {
|
||||
currentNode.setInteger(elementName, (new Long(charValue)).longValue());
|
||||
currentNode.setInteger(elementName, (Long.valueOf(charValue)).longValue());
|
||||
} else {
|
||||
currentNode.setString(elementName, charValue);
|
||||
}
|
||||
|
|
|
@ -879,7 +879,7 @@ public class HopObject extends ScriptableObject implements Wrapper, PropertyReco
|
|||
if (d == null) {
|
||||
return null;
|
||||
} else {
|
||||
Object[] args = { new Long(d.getTime()) };
|
||||
Object[] args = { Long.valueOf(d.getTime()) };
|
||||
try {
|
||||
return cx.newObject(core.global, "Date", args);
|
||||
} catch (JavaScriptException nafx) {
|
||||
|
|
|
@ -100,7 +100,7 @@ public final class JSAdapter implements Scriptable, Function {
|
|||
public Object get(int index, Scriptable start) {
|
||||
Function func = getAdapteeFunction(GET_PROP);
|
||||
if (func != null) {
|
||||
return call(func, new Object[] { new Integer(index) });
|
||||
return call(func, new Object[] { Integer.valueOf(index) });
|
||||
} else {
|
||||
start = getAdaptee();
|
||||
return start.get(index, start);
|
||||
|
@ -121,7 +121,7 @@ public final class JSAdapter implements Scriptable, Function {
|
|||
public boolean has(int index, Scriptable start) {
|
||||
Function func = getAdapteeFunction(HAS_PROP);
|
||||
if (func != null) {
|
||||
Object res = call(func, new Object[] { new Integer(index) });
|
||||
Object res = call(func, new Object[] { Integer.valueOf(index) });
|
||||
return Context.toBoolean(res);
|
||||
} else {
|
||||
start = getAdaptee();
|
||||
|
@ -147,7 +147,7 @@ public final class JSAdapter implements Scriptable, Function {
|
|||
if (start == this) {
|
||||
Function func = getAdapteeFunction(PUT_PROP);
|
||||
if( func != null) {
|
||||
call(func, new Object[] { new Integer(index), value });
|
||||
call(func, new Object[] { Integer.valueOf(index), value });
|
||||
} else {
|
||||
start = getAdaptee();
|
||||
start.put(index, start, value);
|
||||
|
@ -169,7 +169,7 @@ public final class JSAdapter implements Scriptable, Function {
|
|||
public void delete(int index) {
|
||||
Function func = getAdapteeFunction(DEL_PROP);
|
||||
if (func != null) {
|
||||
call(func, new Object[] { new Integer(index) });
|
||||
call(func, new Object[] { Integer.valueOf(index) });
|
||||
} else {
|
||||
getAdaptee().delete(index);
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ public final class JSAdapter implements Scriptable, Function {
|
|||
// map a property id. Property id can only be an Integer or String
|
||||
private Object mapToId(Object tmp) {
|
||||
if (tmp instanceof Double) {
|
||||
return new Integer(((Double)tmp).intValue());
|
||||
return Integer.valueOf(((Double)tmp).intValue());
|
||||
} else {
|
||||
return Context.toString(tmp);
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ public class PathWrapper extends ScriptableObject {
|
|||
Object[] ids = new Object[path.size()];
|
||||
|
||||
for (int i=0; i<ids.length; i++) {
|
||||
ids[i] = new Integer(i);
|
||||
ids[i] = Integer.valueOf(i);
|
||||
}
|
||||
|
||||
return ids;
|
||||
|
|
|
@ -569,7 +569,7 @@ public final class RhinoCore implements ScopeProvider {
|
|||
return arg;
|
||||
if (arg instanceof Date) {
|
||||
Date d = (Date) arg;
|
||||
Object[] args = { new Long(d.getTime()) };
|
||||
Object[] args = { Long.valueOf(d.getTime()) };
|
||||
return Context.getCurrentContext().newObject(global, "Date", args);
|
||||
}
|
||||
return Context.toObject(arg, global);
|
||||
|
@ -618,9 +618,9 @@ public final class RhinoCore implements ScopeProvider {
|
|||
} else if (arg instanceof Number) {
|
||||
Number n = (Number) arg;
|
||||
if (arg instanceof Float || arg instanceof Long) {
|
||||
return new Double(n.doubleValue());
|
||||
return Double.valueOf(n.doubleValue());
|
||||
} else if (!(arg instanceof Double)) {
|
||||
return new Integer(n.intValue());
|
||||
return Integer.valueOf(n.intValue());
|
||||
}
|
||||
} else if (arg instanceof INode) {
|
||||
// interpret HopObject as object/dict
|
||||
|
@ -1146,7 +1146,7 @@ public final class RhinoCore implements ScopeProvider {
|
|||
|
||||
// Convert java.util.Date objects to JavaScript Dates
|
||||
if (obj instanceof Date) {
|
||||
Object[] args = { new Long(((Date) obj).getTime()) };
|
||||
Object[] args = { Long.valueOf(((Date) obj).getTime()) };
|
||||
try {
|
||||
return cx.newObject(global, "Date", args);
|
||||
} catch (JavaScriptException nafx) {
|
||||
|
|
|
@ -106,7 +106,7 @@ public class Profiler implements Debugger {
|
|||
Scriptable thisObj, Object[] args) {
|
||||
|
||||
long time = System.nanoTime();
|
||||
timer.push(new Long(time));
|
||||
timer.push(Long.valueOf(time));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -456,7 +456,7 @@ public class DatabaseObject {
|
|||
|
||||
// First return system or or prototype properties
|
||||
if (propertyName.equals("length")) {
|
||||
return new Integer(colNames.size());
|
||||
return Integer.valueOf(colNames.size());
|
||||
} else {
|
||||
if (resultSet == null) {
|
||||
lastError = new SQLException("Attempt to access a released result set");
|
||||
|
@ -515,12 +515,12 @@ public class DatabaseObject {
|
|||
case Types.BIGINT:
|
||||
case Types.SMALLINT:
|
||||
case Types.INTEGER:
|
||||
return new Long(resultSet.getLong(index));
|
||||
return Long.valueOf(resultSet.getLong(index));
|
||||
|
||||
case Types.REAL:
|
||||
case Types.FLOAT:
|
||||
case Types.DOUBLE:
|
||||
return new Double(resultSet.getDouble(index));
|
||||
return Double.valueOf(resultSet.getDouble(index));
|
||||
|
||||
case Types.DECIMAL:
|
||||
case Types.NUMERIC:
|
||||
|
@ -530,9 +530,9 @@ public class DatabaseObject {
|
|||
}
|
||||
|
||||
if (num.scale() > 0) {
|
||||
return new Double(num.doubleValue());
|
||||
return Double.valueOf(num.doubleValue());
|
||||
} else {
|
||||
return new Long(num.longValue());
|
||||
return Long.valueOf(num.longValue());
|
||||
}
|
||||
|
||||
case Types.VARBINARY:
|
||||
|
|
|
@ -764,7 +764,7 @@ public abstract class AbstractServletClient extends HttpServlet {
|
|||
* <strong>IMPLEMENTATION NOTE</strong>: URL decoding is performed
|
||||
* individually on the parsed name and value elements, rather than on
|
||||
* the entire query string ahead of time, to properly deal with the case
|
||||
* where the name or value includes an encoded "=" or "&" character
|
||||
* where the name or value includes an encoded {@code =} or {@code &} character
|
||||
* that would otherwise be interpreted as a delimiter.
|
||||
*
|
||||
* NOTE: byte array data is modified by this method. Caller beware.
|
||||
|
|
|
@ -450,27 +450,27 @@ public class CronJob {
|
|||
cal.setTime(date);
|
||||
|
||||
// try and short-circuit as fast as possible.
|
||||
Integer theYear = new Integer(cal.get(Calendar.YEAR));
|
||||
Integer theYear = Integer.valueOf(cal.get(Calendar.YEAR));
|
||||
if (!year.contains(ALL_VALUE) && !year.contains(theYear))
|
||||
return false;
|
||||
|
||||
Integer theMonth = new Integer(cal.get(Calendar.MONTH));
|
||||
Integer theMonth = Integer.valueOf(cal.get(Calendar.MONTH));
|
||||
if (!month.contains(ALL_VALUE) && !month.contains(theMonth))
|
||||
return false;
|
||||
|
||||
Integer theDay = new Integer(cal.get(Calendar.DAY_OF_MONTH));
|
||||
Integer theDay = Integer.valueOf(cal.get(Calendar.DAY_OF_MONTH));
|
||||
if (!day.contains(ALL_VALUE) && !day.contains(theDay))
|
||||
return false;
|
||||
|
||||
Integer theWeekDay = new Integer(cal.get(Calendar.DAY_OF_WEEK));
|
||||
Integer theWeekDay = Integer.valueOf(cal.get(Calendar.DAY_OF_WEEK));
|
||||
if (!weekday.contains(ALL_VALUE) && !weekday.contains(theWeekDay))
|
||||
return false;
|
||||
|
||||
Integer theHour = new Integer(cal.get(Calendar.HOUR_OF_DAY));
|
||||
Integer theHour = Integer.valueOf(cal.get(Calendar.HOUR_OF_DAY));
|
||||
if (!hour.contains(ALL_VALUE) && !hour.contains(theHour))
|
||||
return false;
|
||||
|
||||
Integer theMinute = new Integer(cal.get(Calendar.MINUTE));
|
||||
Integer theMinute = Integer.valueOf(cal.get(Calendar.MINUTE));
|
||||
if (!minute.contains(ALL_VALUE) && !minute.contains(theMinute))
|
||||
return false;
|
||||
|
||||
|
@ -484,7 +484,7 @@ public class CronJob {
|
|||
public void addYear(int year)
|
||||
{
|
||||
this.year.remove(ALL_VALUE);
|
||||
this.year.add(new Integer(year));
|
||||
this.year.add(Integer.valueOf(year));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -492,7 +492,7 @@ public class CronJob {
|
|||
*/
|
||||
public void removeYear(int year)
|
||||
{
|
||||
this.year.remove(new Integer(year));
|
||||
this.year.remove(Integer.valueOf(year));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -520,7 +520,7 @@ public class CronJob {
|
|||
public void addMonth(int month)
|
||||
{
|
||||
this.month.remove(ALL_VALUE);
|
||||
this.month.add(new Integer(month));
|
||||
this.month.add(Integer.valueOf(month));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -530,7 +530,7 @@ public class CronJob {
|
|||
*/
|
||||
public void removeMonth(int month)
|
||||
{
|
||||
this.month.remove(new Integer(month));
|
||||
this.month.remove(Integer.valueOf(month));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -556,7 +556,7 @@ public class CronJob {
|
|||
public void addDay(int day)
|
||||
{
|
||||
this.day.remove(ALL_VALUE);
|
||||
this.day.add(new Integer(day));
|
||||
this.day.add(Integer.valueOf(day));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -564,7 +564,7 @@ public class CronJob {
|
|||
*/
|
||||
public void removeDay(int day)
|
||||
{
|
||||
this.day.remove(new Integer(day));
|
||||
this.day.remove(Integer.valueOf(day));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -592,7 +592,7 @@ public class CronJob {
|
|||
public void addWeekday(int weekday)
|
||||
{
|
||||
this.weekday.remove(ALL_VALUE);
|
||||
this.weekday.add(new Integer(weekday));
|
||||
this.weekday.add(Integer.valueOf(weekday));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -602,7 +602,7 @@ public class CronJob {
|
|||
*/
|
||||
public void removeWeekday(int weekday)
|
||||
{
|
||||
this.weekday.remove(new Integer(weekday));
|
||||
this.weekday.remove(Integer.valueOf(weekday));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -628,7 +628,7 @@ public class CronJob {
|
|||
public void addHour(int hour)
|
||||
{
|
||||
this.hour.remove(ALL_VALUE);
|
||||
this.hour.add(new Integer(hour));
|
||||
this.hour.add(Integer.valueOf(hour));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -636,7 +636,7 @@ public class CronJob {
|
|||
*/
|
||||
public void removeHour(int hour)
|
||||
{
|
||||
this.hour.remove(new Integer(hour));
|
||||
this.hour.remove(Integer.valueOf(hour));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -662,7 +662,7 @@ public class CronJob {
|
|||
public void addMinute(int minute)
|
||||
{
|
||||
this.minute.remove(ALL_VALUE);
|
||||
this.minute.add(new Integer(minute));
|
||||
this.minute.add(Integer.valueOf(minute));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -670,7 +670,7 @@ public class CronJob {
|
|||
*/
|
||||
public void removeMinute(int minute)
|
||||
{
|
||||
this.minute.remove(new Integer(minute));
|
||||
this.minute.remove(Integer.valueOf(minute));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -127,7 +127,7 @@ public final class HtmlEncoder {
|
|||
/**
|
||||
* Do "smart" encodging on a string. This means that valid HTML entities and tags,
|
||||
* Helma macros and HTML comments are passed through unescaped, while
|
||||
* other occurrences of '<', '>' and '&' are encoded to HTML entities.
|
||||
* other occurrences of {@code <}, {@code >} and {@code &} are encoded to HTML entities.
|
||||
*/
|
||||
public final static String encode(String str) {
|
||||
if (str == null) {
|
||||
|
@ -151,7 +151,7 @@ public final class HtmlEncoder {
|
|||
/**
|
||||
* Do "smart" encodging on a string. This means that valid HTML entities and tags,
|
||||
* Helma macros and HTML comments are passed through unescaped, while
|
||||
* other occurrences of '<', '>' and '&' are encoded to HTML entities.
|
||||
* other occurrences of {@code <}, {@code >} and {@code &} are encoded to HTML entities.
|
||||
*/
|
||||
public final static void encode(String str, StringBuffer ret) {
|
||||
encode(str, ret, false, null);
|
||||
|
@ -160,7 +160,7 @@ public final class HtmlEncoder {
|
|||
/**
|
||||
* Do "smart" encodging on a string. This means that valid HTML entities and tags,
|
||||
* Helma macros and HTML comments are passed through unescaped, while
|
||||
* other occurrences of '<', '>' and '&' are encoded to HTML entities.
|
||||
* other occurrences of {@code <}, {@code >} and {@code &} are encoded to HTML entities.
|
||||
*
|
||||
* @param str the string to encode
|
||||
* @param ret the string buffer to encode to
|
||||
|
|
Loading…
Add table
Reference in a new issue