-
Notifications
You must be signed in to change notification settings - Fork 154
Closed
Labels
not related to F4JThis issue is not related to this project and will be ignoredThis issue is not related to this project and will be ignored
Description
Subject of the issue
Response parsing doesn't handle HTML5 acceptable elements (such as <hr>
without trailing slash).
Your environment
Version: 3.0.0
JDK: 8
Steps to reproduce
...
Flickr flickr = new Flickr(FLICKR_API_KEY, FLICKR_SHARED_SECRET, new REST());
long searchSpan = (5 * 60 * 1000L);
final Set<String> extras = new HashSet<>(Arrays.asList("url_o, tags"));
...
// fetchDate is : 2008-12-13T21:00:01
// page is 2
final SearchParameters params = new SearchParameters();
params.setExtras(extras);
params.setMaxUploadDate(new Date(fetchDate));
params.setMinUploadDate(new Date(fetchDate - searchSpan));
params.setPrivacyFilter(1); // only get public photos
try {
final PhotoList<Photo> results = flickr.getPhotosInterface().search(params, pageSize, page);
final String fetchDateAsString = dateFormat.format(new Date(fetchDate));
return results;
}
Expected behaviour
In HTML5 void elements no longer need the trailing /
Actual behaviour
FlickrRuntimeException parsing the response data from flickr (see logs below).
Log
[ERROR] [Fatal Error] :6:3: The element type "hr" must be terminated by the matching end-tag "</hr>".
[ERROR] Error on the Flickr API for date 2008-12-13T21:00:01 and page 2
com.flickr4java.flickr.FlickrRuntimeException: org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 3; The element type "hr" must be terminated by the matching end-tag "</hr>".
at com.flickr4java.flickr.REST.get(REST.java:161)
Metadata
Metadata
Assignees
Labels
not related to F4JThis issue is not related to this project and will be ignoredThis issue is not related to this project and will be ignored