(self, m)
| 223 | class LinkPattern (Pattern): |
| 224 | """ Return a link element from the given match. """ |
| 225 | def handleMatch(self, m): |
| 226 | el = markdown.etree.Element("a") |
| 227 | el.text = m.group(2) |
| 228 | title = m.group(11) |
| 229 | href = m.group(9) |
| 230 | |
| 231 | if href: |
| 232 | if href[0] == "<": |
| 233 | href = href[1:-1] |
| 234 | el.set("href", self.sanitize_url(href.strip())) |
| 235 | else: |
| 236 | el.set("href", "") |
| 237 | |
| 238 | if title: |
| 239 | title = dequote(title) #.replace('"', """) |
| 240 | el.set("title", title) |
| 241 | return el |
| 242 | |
| 243 | def sanitize_url(self, url): |
| 244 | """ |
nothing calls this directly
no test coverage detected