<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - Error in inserting hyperlink when selected text starts with a slash"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=123890">123890</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Error in inserting hyperlink when selected text starts with a slash
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>6.1.5.2 release
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Writer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mahmood.saghaei@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="http://bugs.documentfoundation.org/attachment.cgi?id=149759" name="attach_149759" title="a sample writer file demonstration the problem">attachment 149759</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=149759&action=edit" title="a sample writer file demonstration the problem">[details]</a></span>
a sample writer file demonstration the problem
When a piece of text which starts with a forward slash is selected and then a
hyperlink defined in the insert hyperlink dialog, the result will be two links
with similar targets but with differing texts. The text for the first link is a
single slash and for the next link is the remainder of the text.
Steps to reproduce:
sample text = "/for" {without double quotes of course}
sample link = "<a href="http://www.example.com">http://www.example.com</a>"
1 - create the link with the sample text and link and save the file
2 - rename the file to a zip file
3 - extract the zip file
4 - open the "content.xml" file in the extracted folder
5 - search for the sample link
6 - you will find two links one with a "/" and another with the "for":
first link
<text:a xlink:type="simple" xlink:href="<a href="http://www.example.com/">http://www.example.com/</a>"
text:style-name="Internet_20_link"
text:visited-style-name="Visited_20_Internet_20_Link">/</text:a>
second link
<text:a xlink:type="simple" xlink:href="<a href="http://www.example.com/">http://www.example.com/</a>"
text:style-name="Internet_20_link"
text:visited-style-name="Visited_20_Internet_20_Link"><text:span
text:style-name="T1">for</text:span></text:a></text:p></office:text></office:body></office:document-content></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>