Commit 1bb4578e authored by amnabilal's avatar amnabilal

[bp/r65944][Fix]Fixed, word anchor was getting replaced by processHyperlinks

parent c48029c6
......@@ -823,7 +823,7 @@ $(".convert-mailto").removeClass("convert-mailto").each(function () {
// Check if there is a url in the text
$linkSup = $doc->createElement("sup");
if (preg_match("/(http|https)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/", $anchor->getAttribute('href'), $url)) {
$linkAn = $doc->createElement("anchor", "[" . $linkCnt . "]");
$linkAn = $doc->createElement("hyperanchor", "[" . $linkCnt . "]");
$linkAn->setAttribute("href", "#" . $pageCounter . "lnk" . $linkCnt);
$linkSup->appendChild($linkAn);
$link->appendChild($linkSup);
......@@ -842,7 +842,7 @@ $(".convert-mailto").removeClass("convert-mailto").each(function () {
$hrefDiv->setAttribute('class', "footnotearea");
$doc->getElementsByTagName('body')->item(0)->appendChild($hrefDiv);
$content = $doc->saveHTML();
return str_replace("anchor", "a", $content);
return str_replace("hyperanchor", "a", $content);
}// End of processHyperlinks
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment