Fossil SCM
When editing a link in the WYSIWYG editor, always use the literal HREF link text, not the absolute URL.
Commit
3bf27c4c61ea9d0ad2606a6aa42276599c5ce5556c7dd8f44c7790aa260b778e
Parent
54b696def718207…
1 file changed
+1
-1
+1
-1
| --- src/wysiwyg.c | ||
| +++ src/wysiwyg.c | ||
| @@ -264,11 +264,11 @@ | ||
| 264 | 264 | @ if (!sel) return; |
| 265 | 265 | @ return getNodeUrl(sel.focusNode) || getNodeUrl(sel.anchorNode); |
| 266 | 266 | @ } |
| 267 | 267 | @ function getNodeUrl(node) { |
| 268 | 268 | @ while (node) { |
| 269 | - @ if (node.nodeName === 'A') return node.href; | |
| 269 | + @ if (node.nodeName === 'A') return node.getAttribute('href'); | |
| 270 | 270 | @ node = node.parentElement; |
| 271 | 271 | @ } |
| 272 | 272 | @ } |
| 273 | 273 | @ |
| 274 | 274 | @ } |
| 275 | 275 |
| --- src/wysiwyg.c | |
| +++ src/wysiwyg.c | |
| @@ -264,11 +264,11 @@ | |
| 264 | @ if (!sel) return; |
| 265 | @ return getNodeUrl(sel.focusNode) || getNodeUrl(sel.anchorNode); |
| 266 | @ } |
| 267 | @ function getNodeUrl(node) { |
| 268 | @ while (node) { |
| 269 | @ if (node.nodeName === 'A') return node.href; |
| 270 | @ node = node.parentElement; |
| 271 | @ } |
| 272 | @ } |
| 273 | @ |
| 274 | @ } |
| 275 |
| --- src/wysiwyg.c | |
| +++ src/wysiwyg.c | |
| @@ -264,11 +264,11 @@ | |
| 264 | @ if (!sel) return; |
| 265 | @ return getNodeUrl(sel.focusNode) || getNodeUrl(sel.anchorNode); |
| 266 | @ } |
| 267 | @ function getNodeUrl(node) { |
| 268 | @ while (node) { |
| 269 | @ if (node.nodeName === 'A') return node.getAttribute('href'); |
| 270 | @ node = node.parentElement; |
| 271 | @ } |
| 272 | @ } |
| 273 | @ |
| 274 | @ } |
| 275 |