summaryrefslogtreecommitdiff
blob: d8643dbe680f42ae09109b6ac89d90e7ec7b0328 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
diff --git a/com/aelitis/azureus/core/metasearch/Result.java b/com/aelitis/azureus/core/metasearch/Result.java
index bec05e1..9481f86 100644
--- a/com/aelitis/azureus/core/metasearch/Result.java
+++ b/com/aelitis/azureus/core/metasearch/Result.java
@@ -28,7 +28,7 @@ import java.util.Locale;
 import java.util.Map;
 import java.util.Random;
 
-import org.apache.commons.lang.Entities;
+import org.apache.commons.lang.StringEscapeUtils;
 import org.gudy.azureus2.core3.util.AENetworkClassifier;
 import org.gudy.azureus2.core3.util.DisplayFormatters;
 import org.gudy.azureus2.core3.util.HostNameToIPResolver;
@@ -464,6 +464,6 @@ public abstract class Result {
 		if ( input == null ){
 			return( null );
 		}
-		return( Entities.HTML40.unescape( input ));
+		return( StringEscapeUtils.unescapeHtml( input ));
 	}
 }
diff --git a/com/aelitis/azureus/core/metasearch/impl/web/WebResult.java b/com/aelitis/azureus/core/metasearch/impl/web/WebResult.java
index 2d353b8..8ebf9ff 100644
--- a/com/aelitis/azureus/core/metasearch/impl/web/WebResult.java
+++ b/com/aelitis/azureus/core/metasearch/impl/web/WebResult.java
@@ -87,14 +87,14 @@ public class WebResult extends Result {
 	public void setNameFromHTML(String name) {
 		if(name != null) {
 			name = removeHTMLTags(name);
-			this.name = Entities.HTML40.unescape(name);
+			this.name = StringEscapeUtils.unescapeHtml(name);
 		}
 	}
 	
 	public void setCommentsFromHTML(String comments) {
 		if(comments != null) {
 			comments = removeHTMLTags(comments);
-			comments = Entities.HTML40.unescape(comments);
+			comments = StringEscapeUtils.unescapeHtml(comments);
 			comments = comments.replaceAll(",", "");
 			comments = comments.replaceAll(" ", "");
 			try{
@@ -107,7 +107,7 @@ public class WebResult extends Result {
 	public void setCategoryFromHTML(String category) {
 		if(category != null) {
 			category = removeHTMLTags(category);
-			this.category = Entities.HTML40.unescape(category).trim();
+			this.category = StringEscapeUtils.unescapeHtml(category).trim();
 			/*int separator = this.category.indexOf(">");
 			
 			if(separator != -1) {
@@ -136,7 +136,7 @@ public class WebResult extends Result {
 	public void setNbPeersFromHTML(String nbPeers) {
 		if(nbPeers != null) {
 			nbPeers = removeHTMLTags(nbPeers);
-			String nbPeersS = Entities.HTML40.unescape(nbPeers);
+			String nbPeersS = StringEscapeUtils.unescapeHtml(nbPeers);
 			nbPeersS = nbPeersS.replaceAll(",", "");
 			nbPeersS = nbPeersS.replaceAll(" ", "");
 			try {
@@ -151,7 +151,7 @@ public class WebResult extends Result {
 	public void setNbSeedsFromHTML(String nbSeeds) {
 		if(nbSeeds != null) {
 			nbSeeds = removeHTMLTags(nbSeeds);
-			String nbSeedsS = Entities.HTML40.unescape(nbSeeds);
+			String nbSeedsS = StringEscapeUtils.unescapeHtml(nbSeeds);
 			nbSeedsS = nbSeedsS.replaceAll(",", "");
 			nbSeedsS = nbSeedsS.replaceAll(" ", "");
 			try {
@@ -166,7 +166,7 @@ public class WebResult extends Result {
 	public void setNbSuperSeedsFromHTML(String nbSuperSeeds) {
 		if(nbSuperSeeds != null) {
 			nbSuperSeeds = removeHTMLTags(nbSuperSeeds);
-			String nbSuperSeedsS = Entities.HTML40.unescape(nbSuperSeeds);
+			String nbSuperSeedsS = StringEscapeUtils.unescapeHtml(nbSuperSeeds);
 			nbSuperSeedsS = nbSuperSeedsS.replaceAll(",", "");
 			nbSuperSeedsS = nbSuperSeedsS.replaceAll(" ", "");
 			try {
@@ -248,7 +248,7 @@ public class WebResult extends Result {
 	public void setPublishedDateFromHTML(String publishedDate) {
 		if(publishedDate != null && publishedDate.length() > 0) {
 			publishedDate = removeHTMLTags(publishedDate);
-			String publishedDateS = Entities.HTML40.unescape(publishedDate).replace((char)160,(char)32);
+			String publishedDateS = StringEscapeUtils.unescapeHtml(publishedDate).replace((char)160,(char)32);
 			this.publishedDate = dateParser.parseDate(publishedDateS);
 		}
 	}
@@ -257,7 +257,7 @@ public class WebResult extends Result {
 	public void setSizeFromHTML(String size) {
 		if(size != null) {
 			size = removeHTMLTags(size);
-			String sizeS = Entities.HTML40.unescape(size).replace((char)160,(char)32);
+			String sizeS = StringEscapeUtils.unescapeHtml(size).replace((char)160,(char)32);
 			sizeS = sizeS.replaceAll("<[^>]+>", " ");
 			//Add a space between the digits and unit if there is none
 			sizeS = sizeS.replaceFirst("(\\d)([a-zA-Z])", "$1 $2");
@@ -303,7 +303,7 @@ public class WebResult extends Result {
 	public void setVotesFromHTML(String votes_str) {
 		if(votes_str != null) {
 			votes_str = removeHTMLTags(votes_str);
-			votes_str = Entities.HTML40.unescape(votes_str);
+			votes_str = StringEscapeUtils.unescapeHtml(votes_str);
 			votes_str = votes_str.replaceAll(",", "");
 			votes_str = votes_str.replaceAll(" ", "");
 			try {
@@ -317,7 +317,7 @@ public class WebResult extends Result {
 	public void setVotesDownFromHTML(String votes_str) {
 		if(votes_str != null) {
 			votes_str = removeHTMLTags(votes_str);
-			votes_str = Entities.HTML40.unescape(votes_str);
+			votes_str = StringEscapeUtils.unescapeHtml(votes_str);
 			votes_str = votes_str.replaceAll(",", "");
 			votes_str = votes_str.replaceAll(" ", "");
 			try {