public String encodeTitleDotUrl(String wikiTitle, boolean firstCharacterAsUpperCase) {
return Encoder.encodeTitleDotUrl(wikiTitle, firstCharacterAsUpperCase);
}
public void appendInternalLink(String topic, String hashSection, String topicDescription, String cssClass, boolean parseRecursive) {
WPATag aTagNode = new WPATag();
// append(aTagNode);
// aTagNode.addAttribute("id", "w", true);
String href = encodeTitleToUrl(topic, true);
if (hashSection != null) {
href = href + '#' + encodeTitleDotUrl(hashSection, true);
}
aTagNode.addAttribute("href", href, true);
if (cssClass != null) {
aTagNode.addAttribute("class", cssClass, true);
}
aTagNode.addObjectAttribute("wikilink", topic);
pushNode(aTagNode);
if (parseRecursive) {
WikipediaParser.parseRecursive(topicDescription.trim(), this, false, true);
} else {
aTagNode.addChild(new ContentToken(topicDescription));
}
popNode();
// ContentToken text = new ContentToken(topicDescription);
// aTagNode.addChild(text);