langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
changeset 23123 fd8ad69ac7fe
parent 22163 3651128c74eb
child 23794 9437acfa99e9
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Fri Feb 21 10:35:19 2014 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Fri Feb 21 15:14:09 2014 +0400
@@ -1713,9 +1713,13 @@
                     //might be missing '>' character because the href has an inline tag.
                     break;
                 }
-                if (textBuff.substring(begin, end).contains("\"")){
-                    begin = textBuff.indexOf("\"", begin) + 1;
-                    end = textBuff.indexOf("\"", begin +1);
+
+                String quote = textBuff.substring(begin, end);
+                quote = quote.contains("\"") ? "\"" :
+                        quote.contains("\'") ? "\'" : null;
+                if (quote != null) {
+                    begin = textBuff.indexOf(quote, begin) + 1;
+                    end = textBuff.indexOf(quote, begin +1);
                     if (begin == 0 || end == -1){
                         //Link is missing a quote.
                         break;