| 549 | |
| 550 | |
| 551 | void EnmlFormatter::fixLinkNode(QWebElement e) { |
| 552 | QString enTag = e.attribute("en-tag", ""); |
| 553 | if (enTag.toLower() == "en-media") { |
| 554 | resources.append(e.attribute("lid").toInt()); |
| 555 | e.removeAttribute("style"); |
| 556 | e.removeAttribute("href"); |
| 557 | e.removeAttribute("title"); |
| 558 | e.removeAttribute("data-saferedirecturl"); |
| 559 | removeInvalidAttributes(e); |
| 560 | e.removeAllChildren(); |
| 561 | QString newXml = e.toOuterXml(); |
| 562 | newXml.replace("<a", "<en-media"); |
| 563 | newXml.replace("</a>", "</en-media>"); |
| 564 | e.setOuterXml(newXml); |
| 565 | } |
| 566 | QString latex = e.attribute("href", ""); |
| 567 | if (latex.toLower().startsWith("latex:///")) { |
| 568 | removeInvalidAttributes(e); |
| 569 | QString formula = e.attribute("title"); |
| 570 | e.setAttribute("href", QString("http://latex.codecogs.com/gif.latex?%1").arg(formula)); |
| 571 | //e.setOuterXml(e.toInnerXml()); |
| 572 | } |
| 573 | removeInvalidAttributes(e); |
| 574 | checkAttributes(e, attrs+focus+a); |
| 575 | } |
| 576 | |
| 577 | |
| 578 |
nothing calls this directly
no test coverage detected