Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public AttributeItem(int linePos, int i, int inputPos, String attrName, String a
}

static protected final String REG_ATTRIBUTES = "(?si)(\\w+)[\\s=]+(((\\x22|\\x27|#)((?!\\4).|\\4{2})*\\4))";
// Compiled once: getAttributes() runs for every tag with attributes in a scan.
static private final Pattern ATTRIBUTES_PATTERN = Pattern.compile(REG_ATTRIBUTES, Pattern.CASE_INSENSITIVE);
private static CFMLStartTag INSTANCE = null;

protected CFMLStartTag(final String description, final String startDelimiter, final String closingDelimiter,
Expand Down Expand Up @@ -121,7 +123,7 @@ protected ArrayList getAttributes(String inData) {
Matcher matcher;
Pattern pattern;
String attributeName, attributeValue;
pattern = Pattern.compile(REG_ATTRIBUTES, Pattern.CASE_INSENSITIVE);
pattern = ATTRIBUTES_PATTERN;
matcher = pattern.matcher(inData);
if (inData.trim().endsWith("&")) {
userMessage(0, "stripAttributes", "Last attribute cannot be an ampersand", "ERR", null);
Expand Down
Loading