-
Notifications
You must be signed in to change notification settings - Fork 124
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
Escaped HTML in footnotes #118
Comments
Test fail due to erusev/parsedown-extra#118
Thanks for reporting this – there's a little bit of discussion over at #117 (comment) if you're interested. Hopefully should have a fix out soon. |
As reported in erusev/parsedown-extra#118 this breaking change will cause errors in the package. For now, a previous version will be used untill that issue is fixed. This change will also prevent users to update to Laravel v5.6.7 or greater, as it requires Parsedown v1.7.0 or greater.
Hello. Any idea when we might expect a fix? Thanks. |
Bump |
There are some first steps toward what will hopefully become a proper fix in erusev/parsedown#576. Once that is done Parsedown-extra will have access an AST of elements instead of just the final HTML string, so it'll be able to rewrite the parsed structure without directly having to act on an HTML string, and just shoving HTML into what is meant to be text bound within a single element (this is why footnotes are currently being escaped). It would be possible get a patch out a bit sooner once the smaller erusev/parsedown#574 is finalised, since it'll allow basically keeping the current algorithm with a very minor adjustment. However from a cursory look (as mentioned in #117 (comment)), I'm pretty sure Parsedown-extra has its own syntax introduced XSS vectors (even just looking within footnotes), so this type of fix wouldn't be suitable if you're dealing with any kind of untrusted user-input (it wouldn't be any worse than the current version is in that regard though – so just a heads up if that applies to anyone). Anyway, in order to benefit from the new safety features within Parsedown, Parsedown-Extra would need to use the method described above so that escaping can be done properly (and probably some other changes too). |
erusev/parsedown#576 and erusev/parsedown#574 seem to be merged. Let us know if we can provide any help for this @aidantwoods! |
Any updates on this? |
The issue is still there @wottpal You can use the pre-release 0.8.0 here is it fixed, but be aware that there are some bugs |
Nice to hear somebody took care of it. I’ll wait for the stable 🙃 |
Maybe it can be reverted at least? this issue broke our blogs on October CMS :/ |
Is it possible to tag a stable release so that we can all use the bugfix? Thanks :) |
Is there any update on this? |
If you use a Definition Lists some where in your markdown it can broke the footnote, not sure why yet |
I develop a WordPress Markwon editor plugin and my user reported this issue to me After spending time to view the code, I think the only way to solve it is to modify Parsedown.php (line: 1507)
|
@erusev Just giving this a little push as a lot of people need a newly tagged stable release to fix this. |
@aidantwoods @erusev is there an ETA on this? |
Is there anything I can do to help get this resolved? It's been open for 18 months, would love a fix! |
@aidantwoods could you share your latest thoughts on this issue? I'd love to know about causes and possible solutions. Thanks! |
This should be resolved in
Instead of just releasing these beta versions as major version bumps I wanted to create a proper API boundary for extensions to use so that this doesn't occur in future. There's quite a bit of work gone into what that new version might look like over in erusev/parsedown#708, though I'm hesitant to merge this in without feedback. |
Just for clarification: Does this mean that we already see a light at the end of the tunnel? Would like to report this back to the corresponding OctoberCMS-issue so that back there we could also get a heads-up for when it'll work without monkey patching :) |
Short-circuited a fix to this in #144 by porting a subset of a parsedown 1.8 beta feature (rawHtml) into stable. It is important that Parsedown 1.7.x does not itself utilise this feature so as to avoid potential breakage caused by adding features like this. Fix is released as Some context on potential breakage for 1.8-beta: getgrav/grav#1972 (comment) As mentioned before, I think the right thing to do going forward is to put efforts into 2.0 (which aims to define a clear API for "extensions" to use) rather than trying to tiptoe around an undefined boundary for breakage due to extensions being able (and arguably encouraged by docs) to tightly couple themselves to internal observed behaviours. |
Hi,
Since the latest change in
parsedown
(erusev/parsedown#495) footnotes are broken (reference AlfredoRamos/parsedown-extra-laravel/jobs/348703852), they display escaped HTML.Parsedown: 1.6.4
Parsedown Extra: 0.7.1
Parsedown: 1.7.0
Parsedown Extra: 0.7.1
As you can see, the HTML inside the
<li>
tag is escaped.My test script:
I've tried to disable safe-mode but it doesn't seem to do anything.
My server runs PHP 7.2.3
The text was updated successfully, but these errors were encountered: