# phpBB3 importer's link conversion breaks links with additional parameters

**URL:** https://meta.discourse.org/t/phpbb3-importers-link-conversion-breaks-links-with-additional-parameters/47225
**Category:** Bug
**Created:** [2016年七月13日 15:41 UTC](https://meta.discourse.org/t/phpbb3-importers-link-conversion-breaks-links-with-additional-parameters/47225 "2016-07-13T15:41:41Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![palant](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/palant/32/104531_2.png) [@palant](https://meta.discourse.org/u/palant)
#### Post date: [2016年七月13日 15:41 UTC](https://meta.discourse.org/t/phpbb3-importers-link-conversion-breaks-links-with-additional-parameters/47225/1 "2016-07-13T15:41:41Z")

</div>

A post on my phpBB forum had the following link (no additional markup):

> viewtopic.php?f=1&t=1234&p=4321&hilit=foo#p4321

This link has been converted by the importer into the following markup:

> `[viewtopic.php?f=1&t=1234&p=4321&hilit=foo#p4321](https://example.com/forum/some-topic/1234/2&hilit=foo#p4321)`

And the link target is broken. Looking at the [regular expressions used for conversion](https://github.com/discourse/discourse/blob/be3a5a56ccc284b352aa65080fc6b955f73cc72a/script/import_scripts/phpbb3/support/text_processor.rb#L142), `long_internal_link_regexp` will only apply to complete links whereas `short_internal_link_regexp` doesn’t - it will happily convert the start of the link while leaving the rest of it (here `&hilit=foo#p4321`) unchanged.

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [2016年七月27日 20:38 UTC](https://meta.discourse.org/t/phpbb3-importers-link-conversion-breaks-links-with-additional-parameters/47225/2 "2016-07-27T20:38:26Z")

</div>

This has been fixed:  
[https://github.com/discourse/discourse/pull/4350](https://github.com/discourse/discourse/pull/4350)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2016年七月28日 11:15 UTC](https://meta.discourse.org/t/phpbb3-importers-link-conversion-breaks-links-with-additional-parameters/47225/3 "2016-07-28T11:15:53Z")

</div>


