Author: ajamtli
Date: 2006-04-19 12:17:59 +0200 (Wed, 19 Apr 2006)
New Revision: 2768
Modified:
trunk/src/java/no/schibstedsok/front/searchportal/result/Decoder.java
Log:
Making sure the infotext is not cut in the middle of a HTML tag.
Modified: trunk/src/java/no/schibstedsok/front/searchportal/result/Decoder.java
===================================================================
--- trunk/src/java/no/schibstedsok/front/searchportal/result/Decoder.java
2006-04-19 10:05:50 UTC (rev 2767)
+++ trunk/src/java/no/schibstedsok/front/searchportal/result/Decoder.java
2006-04-19 10:17:59 UTC (rev 2768)
@@ -40,8 +40,10 @@
/* Make sure we are not cutting the string in the middle of a
HTML tag. */
if (s.indexOf("<",length) > s.indexOf(">", length)){
length = s.indexOf(">", length) + 1;
+ s = s.substring(0, length);
+ } else {
+ s = s.substring(0, length) + "..";
}
- s = s.substring(0, length) + "..";
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace(); //To change body of catch statement use File
| Settings | File Templates.
_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits