# Import script (phpbb)

**URL:** <https://meta.discourse.org/t/import-script-phpbb/40424>\
**Category:** Bug\
**Created:** [2016 年3 月 2 日 01:30 UTC](https://meta.discourse.org/t/import-script-phpbb/40424 "2016-03-02T01:30:06Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![ryantm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryantm/32/134063_2.png) [@ryantm](https://meta.discourse.org/u/ryantm)\
发布日期： [2016 年3 月 2 日 01:30 UTC](https://meta.discourse.org/t/import-script-phpbb/40424/1 "2016-03-02T01:30:06Z")

</div>

Hello.

I tried this against the latest discourse master bff965327c0677768e58dd9eaf2b834a22d2342f

The issue is if you have a phpbb post that contains exactly

```
https://www.youtube.com/watch?v=COvnHv42T-A

```

and you are using @neil’s version of bbcode\_to\_md. You have a raw post\_text of

```
<!-- m --><a class="postlink" href="https://www.youtube.com/watch?v=COvnHv42T-A">https://www.youtube.com/watch?v=COvnHv42T-A</a><!-- m -->

```

which goes through text\_processor.rb process\_links which changes it to

```
[youtube.com/watch?v=COvnHv42T-A](https://www.youtube.com/watch?v=COvnHv42T-A)

```

which then goes through bbcode\_to\_md code and turns into

```
http://www.youtube.com/watch?v=COvnHv42T-A)

```

It seems that the problem is that the import script text\_processor is assuming that process\_links is going to happen after the bbcode\_to\_md is run in base.rb, but it happens before. If I reverse the order of them by moving the bbcode\_to\_md call into text\_processor.rb, it seems to fix it, but I’m not sure if that breaks other import scripts.

Ryan

---

_[View the full topic](https://meta.discourse.org/t/import-script-phpbb/40424)._
