-
Bug
-
Resolution: Obsolete
-
Low
-
None
-
4.0, 4.0.5
-
None
-
IE8
Steps to reproduce:
- Create a new page
- Type [ to start autocompleting a link.
- Type "Foo".
- Using the mouse, click "Insert Link to Create New Page"
- Press Enter twice.
- Type [ to start autocompleting a link.
- Type "Bar".
- Using the mouse, click "Insert Web Link".
NOTE: In javascript-land, this is where the problem starts. - Click the "Advanced" tab.
- Type "Some Text".
- Click out of the text field. The "Insert" button will become enabled.
Is this another bug? I don't know. - Click "Insert".
You will notice some strangeness here:
The newly inserted "Link" appears to be linked, but it is in fact not linked at all.
Upon inspecting the source, you will likely have the following:
<p> <a class="createlink confluence-link" href="http://localhost:8080/pages/createpage.action?spaceKey=THINGS&title=Foo" data-space-key="THINGS" data-content-title="Foo">Foo</a> </p> <p> </p> <p> <a class="confluence-link createlink" href="http://localhost:8080/pages/createpage.action?spaceKey=THINGS&title=Some+Text&linkCreation=true&fromPageId=327686" shape="" data-content-title="Some Text"></a> </p> <p>Bar</p> <p> <a class="confluence-link createlink" href="http://localhost:8080/pages/createpage.action?spaceKey=THINGS&title=Some+Text&linkCreation=true&fromPageId=327686" shape="" data-content-title="Some Text"></a> </p>"
What appears to be happening is that, upon auto-completing the second link (tinyMce-autocomplete-settings-links.js, line 70), the link browser is being passed some HTML for the text of the link: <p>Michael</p>.
When the link is created with the "Advanced" tab, by all accounts the link-browser does the "right thing" – it creates a new link and inserts the aforementioned "text" of the link in the middle.
It all goes horribly wrong when it attempts to insert it in to the browser, though.
Because the link browser has created some code to the tune of <a href="..."><p>Michael</p></a>, and we are inserting the link inside another paragraph (via the NodeUtils.replaceNode() javascript function, something – possibly TinyMCE, possibly Confluence's code, but likely IE8 – is converting that in to <p><a href="..."></a></p><p>Michael</p><p><a href="..."></a></p>.
- relates to
-
CONFSERVER-26166 Entering "\\" in a link makes it uneditable
- Gathering Impact