summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSalvador Zalapa2013-04-30 09:33:47 (EDT)
committer Nick Sandonato2013-04-30 13:42:13 (EDT)
commit6983cd29f17b654791786f248ed81b2ffcd57e19 (patch)
tree20cfb9d4070842848bd6e178bf594b35421f7a40
parent7630d19ffae837bfe989370c3bca6f52853edfe6 (diff)
downloadwebtools.sourceediting-6983cd29f17b654791786f248ed81b2ffcd57e19.zip
webtools.sourceediting-6983cd29f17b654791786f248ed81b2ffcd57e19.tar.gz
webtools.sourceediting-6983cd29f17b654791786f248ed81b2ffcd57e19.tar.bz2
[380091] Validator should warn about missing quotesv201304301743
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLAttributeValidator.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLAttributeValidator.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLAttributeValidator.java
index f288b0d..c4d794f 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLAttributeValidator.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLAttributeValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2012 IBM Corporation and others.
+ * Copyright (c) 2004, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -285,12 +285,21 @@ public class HTMLAttributeValidator extends PrimeValidator {
if (source != null) {
char firstChar = source.charAt(0);
char lastChar = source.charAt(source.length() - 1);
+ boolean unclosedAttr = false;
if (isQuote(firstChar) || isQuote(lastChar)) {
if (lastChar != firstChar) {
- rgnType = REGION_VALUE;
- state = ErrorState.UNCLOSED_ATTR_VALUE;
+ unclosedAttr = true;
+ }
+ }
+ else{
+ if (CMUtil.isXHTML(edec)){
+ unclosedAttr = true;
}
}
+ if (unclosedAttr){
+ rgnType = REGION_VALUE;
+ state = ErrorState.UNCLOSED_ATTR_VALUE;
+ }
}
}
}