<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO - officeooo:rsid multiplies the links"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=112429#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO - officeooo:rsid multiplies the links"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=112429">bug 112429</a>
              from <span class="vcard"><a class="email" href="mailto:regivanx@gmail.com" title="regivanx <regivanx@gmail.com>"> <span class="fn">regivanx</span></a>
</span></b>
        <pre>I can reproduce it in:

LibreOffice 5.4.1.2.0 40m0(Build:2)

What do you have in content.xml?

It is necessary to start from a file that contains this:

<text:p text:style-name="P1">
        <text:a xlink:type="simple" xlink:href="<a href="http://localhost/">http://localhost/</a>"
text:style-name="Internet_20_link"
text:visited-style-name="Visited_20_Internet_20_Link">
                localhost
        </text:a>
</text:p>

Then if you close and reopen with LibreOffice, editing the link and saving will
give this:

<text:p text:style-name="P1">
        <text:a xlink:type="simple" xlink:href="<a href="http://localhost/">http://localhost/</a>"
text:style-name="Internet_20_link"
text:visited-style-name="Visited_20_Internet_20_Link">
                local
        </text:a>
        <text:a xlink:type="simple" xlink:href="<a href="http://localhost/">http://localhost/</a>"
text:style-name="Internet_20_link"
text:visited-style-name="Visited_20_Internet_20_Link">
                <text:span text:style-name="T1">
                        hello
                </text:span>
        </text:a>
        <text:a xlink:type="simple" xlink:href="<a href="http://localhost/">http://localhost/</a>"
text:style-name="Internet_20_link"
text:visited-style-name="Visited_20_Internet_20_Link">
                host
        </text:a>
</text:p>

On the other hand, if you start with a file that contains this:

<text:p text:style-name="P2">
        <text:a xlink:type="simple" xlink:href="<a href="http://localhost/">http://localhost/</a>"
text:style-name="Internet_20_link"
text:visited-style-name="Visited_20_Internet_20_Link">
                <text:span text:style-name="T2">
                        localhost
                </text:span>
        </text:a>
</text:p>

You will not be able to reproduce the bug, because the problem comes from the
way LibreOffice adds automatic styles: if there is already an automatic style
(here: "T2"), you will get correctly:

<text:p text:style-name="P2">
        <text:a xlink:type="simple" xlink:href="<a href="http://localhost/">http://localhost/</a>"
text:style-name="Internet_20_link"
text:visited-style-name="Visited_20_Internet_20_Link">
                <text:span text:style-name="T2">
                        localhellohost
                </text:span>
        </text:a>
</text:p>

Thank you for your interest in this bug. :)</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>