mosbth / Anax-oophp

Course material for the oophp-course, builds on Anax-base.
MIT License
0 stars 6 forks source link

makeClickable anonymus function #3

Closed Slugg0 closed 9 years ago

Slugg0 commented 9 years ago

Maybe I've done something wrong here, but when copying your code and putting it in my Anax, makeClickable creates the link <a href="active/dir/\'http://link.se\'>http://link.se</a>

Replacing
function ($matches) { return "<a href=\'{$matches[0]}\'>{$matches[0]}</a>"; }, with create_function( '$matches', 'return "<a href=\'{$matches[0]}\'>{$matches[0]}</a>";' ), solved it for me.

mosbth commented 9 years ago

How does your text source look like?

mosbth commented 9 years ago

Saw another example, just like this.

some link http://example.com here

I'll check it up tomorrow. The link seems to be incorrect.

Slugg0 commented 9 years ago

I made a testprogram of this Here

mosbth commented 9 years ago

I fixed it by removing \ in the string. Should work in 1.0.1.