URLDetectionTest.php 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. <?php
  2. if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
  3. print "This script must be run from the command line\n";
  4. exit();
  5. }
  6. define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
  7. define('GNUSOCIAL', true);
  8. define('STATUSNET', true); // compatibility
  9. require_once INSTALLDIR . '/lib/common.php';
  10. class URLDetectionTest extends PHPUnit_Framework_TestCase
  11. {
  12. /**
  13. * @dataProvider provider
  14. *
  15. */
  16. public function testProduction($content, $expected)
  17. {
  18. $rendered = common_render_text($content);
  19. // hack!
  20. $rendered = preg_replace('/id="attachment-\d+"/', 'id="attachment-XXX"', $rendered);
  21. $this->assertEquals($expected, $rendered);
  22. }
  23. static public function provider()
  24. {
  25. return array(
  26. array('not a link :: no way',
  27. 'not a link :: no way'),
  28. array('link http://www.somesite.com/xyz/35637563@N00/52803365/ link',
  29. 'link <a href="http://www.somesite.com/xyz/35637563@N00/52803365/" title="http://www.somesite.com/xyz/35637563@N00/52803365/" rel="nofollow external">http://www.somesite.com/xyz/35637563@N00/52803365/</a> link'),
  30. array('http://127.0.0.1',
  31. '<a href="http://127.0.0.1/" title="http://127.0.0.1/" rel="nofollow external">http://127.0.0.1</a>'),
  32. array('127.0.0.1',
  33. '<a href="http://127.0.0.1/" title="http://127.0.0.1/" rel="nofollow external">127.0.0.1</a>'),
  34. array('127.0.0.1:99',
  35. '<a href="http://127.0.0.1:99/" title="http://127.0.0.1:99/" rel="nofollow external">127.0.0.1:99</a>'),
  36. array('127.0.0.1/Name:test.php',
  37. '<a href="http://127.0.0.1/Name:test.php" title="http://127.0.0.1/Name:test.php" rel="nofollow external">127.0.0.1/Name:test.php</a>'),
  38. array('127.0.0.1/~test',
  39. '<a href="http://127.0.0.1/~test" title="http://127.0.0.1/~test" rel="nofollow external">127.0.0.1/~test</a>'),
  40. array('127.0.0.1/+test',
  41. '<a href="http://127.0.0.1/+test" title="http://127.0.0.1/+test" rel="nofollow external">127.0.0.1/+test</a>'),
  42. array('127.0.0.1/$test',
  43. '<a href="http://127.0.0.1/$test" title="http://127.0.0.1/$test" rel="nofollow external">127.0.0.1/$test</a>'),
  44. array('127.0.0.1/\'test',
  45. '<a href="http://127.0.0.1/\'test" title="http://127.0.0.1/\'test" rel="nofollow external">127.0.0.1/\'test</a>'),
  46. array('127.0.0.1/"test',
  47. '<a href="http://127.0.0.1/" title="http://127.0.0.1/" rel="nofollow external">127.0.0.1/</a>&quot;test'),
  48. array('127.0.0.1/test"test',
  49. '<a href="http://127.0.0.1/test" title="http://127.0.0.1/test" rel="nofollow external">127.0.0.1/test</a>&quot;test'),
  50. array('127.0.0.1/-test',
  51. '<a href="http://127.0.0.1/-test" title="http://127.0.0.1/-test" rel="nofollow external">127.0.0.1/-test</a>'),
  52. array('127.0.0.1/_test',
  53. '<a href="http://127.0.0.1/_test" title="http://127.0.0.1/_test" rel="nofollow external">127.0.0.1/_test</a>'),
  54. array('127.0.0.1/!test',
  55. '<a href="http://127.0.0.1/!test" title="http://127.0.0.1/!test" rel="nofollow external">127.0.0.1/!test</a>'),
  56. array('127.0.0.1/*test',
  57. '<a href="http://127.0.0.1/*test" title="http://127.0.0.1/*test" rel="nofollow external">127.0.0.1/*test</a>'),
  58. array('127.0.0.1/test%20stuff',
  59. '<a href="http://127.0.0.1/test%20stuff" title="http://127.0.0.1/test%20stuff" rel="nofollow external">127.0.0.1/test%20stuff</a>'),
  60. array('http://[::1]:99/test.php',
  61. '<a href="http://[::1]:99/test.php" title="http://[::1]:99/test.php" rel="nofollow external">http://[::1]:99/test.php</a>'),
  62. array('http://::1/test.php',
  63. '<a href="http://::1/test.php" title="http://::1/test.php" rel="nofollow external">http://::1/test.php</a>'),
  64. array('http://::1',
  65. '<a href="http://::1/" title="http://::1/" rel="nofollow external">http://::1</a>'),
  66. array('2001:4978:1b5:0:21d:e0ff:fe66:59ab/test.php',
  67. '<a href="http://2001:4978:1b5:0:21d:e0ff:fe66:59ab/test.php" title="http://2001:4978:1b5:0:21d:e0ff:fe66:59ab/test.php" rel="nofollow external">2001:4978:1b5:0:21d:e0ff:fe66:59ab/test.php</a>'),
  68. array('[2001:4978:1b5:0:21d:e0ff:fe66:59ab]:99/test.php',
  69. '<a href="http://[2001:4978:1b5:0:21d:e0ff:fe66:59ab]:99/test.php" title="http://[2001:4978:1b5:0:21d:e0ff:fe66:59ab]:99/test.php" rel="nofollow external">[2001:4978:1b5:0:21d:e0ff:fe66:59ab]:99/test.php</a>'),
  70. array('2001:4978:1b5:0:21d:e0ff:fe66:59ab',
  71. '<a href="http://2001:4978:1b5:0:21d:e0ff:fe66:59ab/" title="http://2001:4978:1b5:0:21d:e0ff:fe66:59ab/" rel="nofollow external">2001:4978:1b5:0:21d:e0ff:fe66:59ab</a>'),
  72. array('http://127.0.0.1',
  73. '<a href="http://127.0.0.1/" title="http://127.0.0.1/" rel="nofollow external">http://127.0.0.1</a>'),
  74. array('example.com',
  75. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">example.com</a>'),
  76. array('example.com',
  77. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">example.com</a>'),
  78. array('http://example.com',
  79. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">http://example.com</a>'),
  80. array('http://example.com.',
  81. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">http://example.com</a>.'),
  82. array('/var/lib/example.so',
  83. '/var/lib/example.so'),
  84. array('example',
  85. 'example'),
  86. array('user@example.com',
  87. '<a href="mailto:user@example.com" title="mailto:user@example.com" rel="nofollow external">user@example.com</a>'),
  88. array('user_name+other@example.com',
  89. '<a href="mailto:user_name+other@example.com" title="mailto:user_name+other@example.com" rel="nofollow external">user_name+other@example.com</a>'),
  90. array('mailto:user@example.com',
  91. '<a href="mailto:user@example.com" title="mailto:user@example.com" rel="nofollow external">mailto:user@example.com</a>'),
  92. array('mailto:user@example.com?subject=test',
  93. '<a href="mailto:user@example.com?subject=test" title="mailto:user@example.com?subject=test" rel="nofollow external">mailto:user@example.com?subject=test</a>'),
  94. array('xmpp:user@example.com',
  95. '<a href="xmpp:user@example.com" title="xmpp:user@example.com" rel="nofollow external">xmpp:user@example.com</a>'),
  96. array('#example',
  97. '#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('example'))) . '" rel="tag">example</a></span>'),
  98. array('#example.com',
  99. '#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('example.com'))) . '" rel="tag">example.com</a></span>'),
  100. array('#.net',
  101. '#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('.net'))) . '" rel="tag">.net</a></span>'),
  102. array('http://example',
  103. '<a href="http://example/" title="http://example/" rel="nofollow external">http://example</a>'),
  104. array('http://3xampl3',
  105. '<a href="http://3xampl3/" title="http://3xampl3/" rel="nofollow external">http://3xampl3</a>'),
  106. array('http://example/',
  107. '<a href="http://example/" title="http://example/" rel="nofollow external">http://example/</a>'),
  108. array('http://example/path',
  109. '<a href="http://example/path" title="http://example/path" rel="nofollow external">http://example/path</a>'),
  110. array('http://example.com',
  111. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">http://example.com</a>'),
  112. array('https://example.com',
  113. '<a href="https://example.com/" title="https://example.com/" rel="nofollow external">https://example.com</a>'),
  114. array('ftp://example.com',
  115. '<a href="ftp://example.com/" title="ftp://example.com/" rel="nofollow external">ftp://example.com</a>'),
  116. array('ftps://example.com',
  117. '<a href="ftps://example.com/" title="ftps://example.com/" rel="nofollow external">ftps://example.com</a>'),
  118. array('http://user@example.com',
  119. '<a href="http://user@example.com/" title="http://user@example.com/" rel="nofollow external">http://user@example.com</a>'),
  120. array('http://user:pass@example.com',
  121. '<a href="http://user:pass@example.com/" title="http://user:pass@example.com/" rel="nofollow external">http://user:pass@example.com</a>'),
  122. array('http://example.com:8080',
  123. '<a href="http://example.com:8080/" title="http://example.com:8080/" rel="nofollow external">http://example.com:8080</a>'),
  124. array('http://example.com:8080/test.php',
  125. '<a href="http://example.com:8080/test.php" title="http://example.com:8080/test.php" rel="nofollow external">http://example.com:8080/test.php</a>'),
  126. array('example.com:8080/test.php',
  127. '<a href="http://example.com:8080/test.php" title="http://example.com:8080/test.php" rel="nofollow external">example.com:8080/test.php</a>'),
  128. array('http://www.example.com',
  129. '<a href="http://www.example.com/" title="http://www.example.com/" rel="nofollow external">http://www.example.com</a>'),
  130. array('http://example.com/',
  131. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">http://example.com/</a>'),
  132. array('http://example.com/path',
  133. '<a href="http://example.com/path" title="http://example.com/path" rel="nofollow external">http://example.com/path</a>'),
  134. array('http://example.com/path.html',
  135. '<a href="http://example.com/path.html" title="http://example.com/path.html" rel="nofollow external">http://example.com/path.html</a>'),
  136. array('http://example.com/path.html#fragment',
  137. '<a href="http://example.com/path.html#fragment" title="http://example.com/path.html#fragment" rel="nofollow external">http://example.com/path.html#fragment</a>'),
  138. array('http://example.com/path.php?foo=bar&bar=foo',
  139. '<a href="http://example.com/path.php?foo=bar&amp;bar=foo" title="http://example.com/path.php?foo=bar&amp;bar=foo" rel="nofollow external">http://example.com/path.php?foo=bar&amp;bar=foo</a>'),
  140. array('http://example.com.',
  141. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">http://example.com</a>.'),
  142. array('http://müllärör.de',
  143. '<a href="http://m&#xFC;ll&#xE4;r&#xF6;r.de/" title="http://m&#xFC;ll&#xE4;r&#xF6;r.de/" rel="nofollow external">http://müllärör.de</a>'),
  144. array('http://ﺱﺲﺷ.com',
  145. '<a href="http://&#xFEB1;&#xFEB2;&#xFEB7;.com/" title="http://&#xFEB1;&#xFEB2;&#xFEB7;.com/" rel="nofollow external">http://ﺱﺲﺷ.com</a>'),
  146. array('http://сделаткартинки.com',
  147. '<a href="http://&#x441;&#x434;&#x435;&#x43B;&#x430;&#x442;&#x43A;&#x430;&#x440;&#x442;&#x438;&#x43D;&#x43A;&#x438;.com/" title="http://&#x441;&#x434;&#x435;&#x43B;&#x430;&#x442;&#x43A;&#x430;&#x440;&#x442;&#x438;&#x43D;&#x43A;&#x438;.com/" rel="nofollow external">http://сделаткартинки.com</a>'),
  148. array('http://tūdaliņ.lv',
  149. '<a href="http://t&#x16B;dali&#x146;.lv/" title="http://t&#x16B;dali&#x146;.lv/" rel="nofollow external">http://tūdaliņ.lv</a>'),
  150. array('http://brændendekærlighed.com',
  151. '<a href="http://br&#xE6;ndendek&#xE6;rlighed.com/" title="http://br&#xE6;ndendek&#xE6;rlighed.com/" rel="nofollow external">http://brændendekærlighed.com</a>'),
  152. array('http://あーるいん.com',
  153. '<a href="http://&#x3042;&#x30FC;&#x308B;&#x3044;&#x3093;.com/" title="http://&#x3042;&#x30FC;&#x308B;&#x3044;&#x3093;.com/" rel="nofollow external">http://あーるいん.com</a>'),
  154. array('http://예비교사.com',
  155. '<a href="http://&#xC608;&#xBE44;&#xAD50;&#xC0AC;.com/" title="http://&#xC608;&#xBE44;&#xAD50;&#xC0AC;.com/" rel="nofollow external">http://예비교사.com</a>'),
  156. array('http://example.com.',
  157. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">http://example.com</a>.'),
  158. array('http://example.com?',
  159. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">http://example.com</a>?'),
  160. array('http://example.com!',
  161. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">http://example.com</a>!'),
  162. array('http://example.com,',
  163. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">http://example.com</a>,'),
  164. array('http://example.com;',
  165. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">http://example.com</a>;'),
  166. array('http://example.com:',
  167. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">http://example.com</a>:'),
  168. array('\'http://example.com\'',
  169. '\'<a href="http://example.com/" title="http://example.com/" rel="nofollow external">http://example.com</a>\''),
  170. array('"http://example.com"',
  171. '&quot;<a href="http://example.com/" title="http://example.com/" rel="nofollow external">http://example.com</a>&quot;'),
  172. array('"http://example.com/"',
  173. '&quot;<a href="http://example.com/" title="http://example.com/" rel="nofollow external">http://example.com/</a>&quot;'),
  174. array('http://example.com',
  175. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">http://example.com</a>'),
  176. array('(http://example.com)',
  177. '(<a href="http://example.com/" title="http://example.com/" rel="nofollow external">http://example.com</a>)'),
  178. array('[http://example.com]',
  179. '[<a href="http://example.com/" title="http://example.com/" rel="nofollow external">http://example.com</a>]'),
  180. array('<http://example.com>',
  181. '&lt;<a href="http://example.com/" title="http://example.com/" rel="nofollow external">http://example.com</a>&gt;'),
  182. array('http://example.com/path/(foo)/bar',
  183. '<a href="http://example.com/path/(foo)/bar" title="http://example.com/path/(foo)/bar" rel="nofollow external">http://example.com/path/(foo)/bar</a>'),
  184. array('http://example.com/path/[foo]/bar',
  185. '<a href="http://example.com/path/" title="http://example.com/path/" rel="nofollow external">http://example.com/path/</a>[foo]/bar'),
  186. array('http://example.com/path/foo/(bar)',
  187. '<a href="http://example.com/path/foo/(bar)" title="http://example.com/path/foo/(bar)" rel="nofollow external">http://example.com/path/foo/(bar)</a>'),
  188. //Not a valid url - urls cannot contain unencoded square brackets
  189. array('http://example.com/path/foo/[bar]',
  190. '<a href="http://example.com/path/foo/" title="http://example.com/path/foo/" rel="nofollow external">http://example.com/path/foo/</a>[bar]'),
  191. array('Hey, check out my cool site http://example.com okay?',
  192. 'Hey, check out my cool site <a href="http://example.com/" title="http://example.com/" rel="nofollow external">http://example.com</a> okay?'),
  193. array('What about parens (e.g. http://example.com/path/foo/(bar))?',
  194. 'What about parens (e.g. <a href="http://example.com/path/foo/(bar)" title="http://example.com/path/foo/(bar)" rel="nofollow external">http://example.com/path/foo/(bar)</a>)?'),
  195. array('What about parens (e.g. http://example.com/path/foo/(bar)?',
  196. 'What about parens (e.g. <a href="http://example.com/path/foo/(bar)" title="http://example.com/path/foo/(bar)" rel="nofollow external">http://example.com/path/foo/(bar)</a>?'),
  197. array('What about parens (e.g. http://example.com/path/foo/(bar).)?',
  198. 'What about parens (e.g. <a href="http://example.com/path/foo/(bar)" title="http://example.com/path/foo/(bar)" rel="nofollow external">http://example.com/path/foo/(bar)</a>.)?'),
  199. //Not a valid url - urls cannot contain unencoded commas
  200. array('What about parens (e.g. http://example.com/path/(foo,bar)?',
  201. 'What about parens (e.g. <a href="http://example.com/path/(foo,bar)" title="http://example.com/path/(foo,bar)" rel="nofollow external">http://example.com/path/(foo,bar)</a>?'),
  202. array('Unbalanced too (e.g. http://example.com/path/((((foo)/bar)?',
  203. 'Unbalanced too (e.g. <a href="http://example.com/path/((((foo)/bar)" title="http://example.com/path/((((foo)/bar)" rel="nofollow external">http://example.com/path/((((foo)/bar)</a>?'),
  204. array('Unbalanced too (e.g. http://example.com/path/(foo))))/bar)?',
  205. 'Unbalanced too (e.g. <a href="http://example.com/path/(foo))))/bar" title="http://example.com/path/(foo))))/bar" rel="nofollow external">http://example.com/path/(foo))))/bar</a>)?'),
  206. array('Unbalanced too (e.g. http://example.com/path/foo/((((bar)?',
  207. 'Unbalanced too (e.g. <a href="http://example.com/path/foo/((((bar)" title="http://example.com/path/foo/((((bar)" rel="nofollow external">http://example.com/path/foo/((((bar)</a>?'),
  208. array('Unbalanced too (e.g. http://example.com/path/foo/(bar))))?',
  209. 'Unbalanced too (e.g. <a href="http://example.com/path/foo/(bar)" title="http://example.com/path/foo/(bar)" rel="nofollow external">http://example.com/path/foo/(bar)</a>)))?'),
  210. array('example.com',
  211. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">example.com</a>'),
  212. array('example.org',
  213. '<a href="http://example.org/" title="http://example.org/" rel="nofollow external">example.org</a>'),
  214. array('example.co.uk',
  215. '<a href="http://example.co.uk/" title="http://example.co.uk/" rel="nofollow external">example.co.uk</a>'),
  216. array('www.example.co.uk',
  217. '<a href="http://www.example.co.uk/" title="http://www.example.co.uk/" rel="nofollow external">www.example.co.uk</a>'),
  218. array('farm1.images.example.co.uk',
  219. '<a href="http://farm1.images.example.co.uk/" title="http://farm1.images.example.co.uk/" rel="nofollow external">farm1.images.example.co.uk</a>'),
  220. array('example.museum',
  221. '<a href="http://example.museum/" title="http://example.museum/" rel="nofollow external">example.museum</a>'),
  222. array('example.travel',
  223. '<a href="http://example.travel/" title="http://example.travel/" rel="nofollow external">example.travel</a>'),
  224. array('example.com.',
  225. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">example.com</a>.'),
  226. array('example.com?',
  227. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">example.com</a>?'),
  228. array('example.com!',
  229. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">example.com</a>!'),
  230. array('example.com,',
  231. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">example.com</a>,'),
  232. array('example.com;',
  233. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">example.com</a>;'),
  234. array('example.com:',
  235. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">example.com</a>:'),
  236. array('\'example.com\'',
  237. '\'<a href="http://example.com/" title="http://example.com/" rel="nofollow external">example.com</a>\''),
  238. array('"example.com"',
  239. '&quot;<a href="http://example.com/" title="http://example.com/" rel="nofollow external">example.com</a>&quot;'),
  240. array('example.com',
  241. '<a href="http://example.com/" title="http://example.com/" rel="nofollow external">example.com</a>'),
  242. array('(example.com)',
  243. '(<a href="http://example.com/" title="http://example.com/" rel="nofollow external">example.com</a>)'),
  244. array('[example.com]',
  245. '[<a href="http://example.com/" title="http://example.com/" rel="nofollow external">example.com</a>]'),
  246. array('<example.com>',
  247. '&lt;<a href="http://example.com/" title="http://example.com/" rel="nofollow external">example.com</a>&gt;'),
  248. array('Hey, check out my cool site example.com okay?',
  249. 'Hey, check out my cool site <a href="http://example.com/" title="http://example.com/" rel="nofollow external">example.com</a> okay?'),
  250. array('Hey, check out my cool site example.com.I made it.',
  251. 'Hey, check out my cool site <a href="http://example.com/" title="http://example.com/" rel="nofollow external">example.com</a>.I made it.'),
  252. array('Hey, check out my cool site example.com.Funny thing...',
  253. 'Hey, check out my cool site <a href="http://example.com/" title="http://example.com/" rel="nofollow external">example.com</a>.Funny thing...'),
  254. array('Hey, check out my cool site example.com.You will love it.',
  255. 'Hey, check out my cool site <a href="http://example.com/" title="http://example.com/" rel="nofollow external">example.com</a>.You will love it.'),
  256. array('What about parens (e.g. example.com/path/foo/(bar))?',
  257. 'What about parens (e.g. <a href="http://example.com/path/foo/(bar)" title="http://example.com/path/foo/(bar)" rel="nofollow external">example.com/path/foo/(bar)</a>)?'),
  258. array('What about parens (e.g. example.com/path/foo/(bar)?',
  259. 'What about parens (e.g. <a href="http://example.com/path/foo/(bar)" title="http://example.com/path/foo/(bar)" rel="nofollow external">example.com/path/foo/(bar)</a>?'),
  260. array('What about parens (e.g. example.com/path/foo/(bar).)?',
  261. 'What about parens (e.g. <a href="http://example.com/path/foo/(bar)" title="http://example.com/path/foo/(bar)" rel="nofollow external">example.com/path/foo/(bar)</a>.)?'),
  262. array('What about parens (e.g. example.com/path/(foo,bar)?',
  263. 'What about parens (e.g. <a href="http://example.com/path/(foo,bar)" title="http://example.com/path/(foo,bar)" rel="nofollow external">example.com/path/(foo,bar)</a>?'),
  264. array('file.ext',
  265. 'file.ext'),
  266. array('file.html',
  267. 'file.html'),
  268. array('file.php',
  269. 'file.php'),
  270. // scheme-less HTTP URLs with @ in the path: http://status.net/open-source/issues/2248
  271. array('http://flickr.com/photos/34807140@N05/3838905434',
  272. '<a href="http://flickr.com/photos/34807140@N05/3838905434" title="http://flickr.com/photos/34807140@N05/3838905434" class="attachment thumbnail" id="attachment-XXX" rel="nofollow external">http://flickr.com/photos/34807140@N05/3838905434</a>'),
  273. array('flickr.com/photos/34807140@N05/3838905434',
  274. '<a href="http://flickr.com/photos/34807140@N05/3838905434" title="http://flickr.com/photos/34807140@N05/3838905434" class="attachment thumbnail" id="attachment-XXX" rel="nofollow external">flickr.com/photos/34807140@N05/3838905434</a>'),
  275. );
  276. }
  277. }