Skip to content

Commit

Permalink
Added checks for html entity names
Browse files Browse the repository at this point in the history
  • Loading branch information
rxtan2 committed Jan 10, 2018
1 parent 0927351 commit 57ba9bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public void parsePageMap(String pageMapFile){
pageTitle = pageTitle.replace("\\", ""); // Removes escape character '\'
pageTitle = pageTitle.trim(); // Removes trailing and leading space
if(pageTitle.isEmpty()) continue;
if (pageTitle.startsWith("List_of") || pageTitle.startsWith("Lists_of")){
if (pageTitle.startsWith("List_of") || pageTitle.startsWith("Lists_of") && (id == resolvedId)){
listPages.add(resolvedId); // Only add resolved pages
}
curIds.add(id); // Adds unresolved Cur Ids
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ public void ParseDoc(String doc){
logger.severe("Exception: " + e.toString());
}
wikiTitle = wikiTitle.replaceAll(" ", "_");
wikiTitle = wikiTitle.replaceAll("&", "&"); // Replaces entity name for the character '&'
wikiTitle = wikiTitle.replaceAll(""", "\""); // Replaces entity name for the character '"'
if (wikiTitle.startsWith("List_of") || wikiTitle.startsWith("Lists_of")) return;

// Gets curID
Expand Down

0 comments on commit 57ba9bc

Please sign in to comment.