Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid markup with textileRestricted #103

Closed
xorock opened this issue Jan 27, 2013 · 4 comments
Closed

Invalid markup with textileRestricted #103

xorock opened this issue Jan 27, 2013 · 4 comments

Comments

@xorock
Copy link

xorock commented Jan 27, 2013

TextileRestricted is generating invalid HTML markup on following:
$textile = new Parser();
echo $textile->textileRestricted('some text "link something(sdfsdf)":http://some.url');

Result is:

<p>some text <a title="sdfsdf" nofollow""="" rel=" rel=" href="http://some.url">link something</a></p>
@netcarver
Copy link
Contributor

Thank you for reporting this.

@netcarver
Copy link
Contributor

@xorock, could you try changing this line in prepare() from...

$this->rel = ($rel) ? ' rel="'.$rel.'"' : '';

...to...

$this->rel = $rel;

and let me know if that fixes the rel/nofollow problem with links (probably not a complete fix as I'll need to fix it on linked images too if this is what I suspect it is.) Thank you.

@xorock
Copy link
Author

xorock commented Jan 27, 2013

Thank You Netcarver for Your interest. After this quick fix markup is displayed correctly.

<p>some text <a title="sdfsdf" rel="nofollow" href="http://some.url">link something</a></p>

BTW. There's a minor bug in docs, "Manual install section". Tag extend DataBag so it must be included last.
include 'Parser.php';
include 'DataBag.php';
include 'Tag.php';

@netcarver
Copy link
Contributor

Ok. I should be able to commit fixes for these later tonight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants