WordPress: Links are not converted correctly
Submitted ptprog, Apr 16 2012 01:26 PM | Last updated Dec 31 2012 08:34 AM
I tried to use the converters to import a wordpress blog, but I have problems with the links, that were not imported correctly.
Something like <a href="link">some text</a> is imported as [url="link">some text.
I think this is only happening with posts with more than one link, and can be solved changing the regexp uses to convert links from #\<a href=(.+)>(.*)\<\/a>#i to #\<a href=(.+?)>(.*?)\<\/a>#i. Not sure if this will cause other problems (I guess that there could be a problem only with nested links...).
I've only noticed this problem with links yet. But based on the other regexp you are using, I guess the problem may occur with other tags, in case they are used more than once in the same post.
Something like <a href="link">some text</a> is imported as [url="link">some text.
I think this is only happening with posts with more than one link, and can be solved changing the regexp uses to convert links from #\<a href=(.+)>(.*)\<\/a>#i to #\<a href=(.+?)>(.*?)\<\/a>#i. Not sure if this will cause other problems (I guess that there could be a problem only with nested links...).
I've only noticed this problem with links yet. But based on the other regexp you are using, I guess the problem may occur with other tags, in case they are used more than once in the same post.
| Status: | Fixed |
| Version: | 0 |
| Fixed In: | 1.2.4 |











1 Comments
Updating Status to: Fixed
Updating Version to: 0
-