-
Notifications
You must be signed in to change notification settings - Fork 68
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
div inside p #416
Comments
This comment has been minimized.
This comment has been minimized.
Okay, I've managed to patch it. Do you accept patches or pull requests, what's the right way to send it? or just here, in comments? I've never made pull requests :) |
Is this issue also connected to #275? Pull request is welcome as well, but I'm wondering if it is worth to check more thoroughly the image handling. |
oops, forgot a comment
They are not. That patch can be applied alongside with this one. Actually №275 helped to notice broken links. It made them visible, like this:
I moved <div> tag outside of <a>. To do so I moved the div wrapping code from _media() to internalmedia() and externalmedia(), cause they actually produce <a> tags.
It's impossible to show on a screenshot :) but both images are links now. And #275 produces a nice paragraph flow: |
Here is a live example with both patches applied: https://petelinsasha.ru/wiki/playground/dw2pdf_test |
If the html is not proper, that should be 'fixed' before we feed it to mpdf, or mpdf should be improved (then tiny example that exactly replicate the case should be created, and used to open an issue there), or DokuWiki should be changed as well, if it is not proper html. |
Hi! There is a code in dw2pdf's renderer.php:
This results in html code like this:
Here we have a <DIV> tag inside <A> tag inside <P> tag, which does not comply HTML standards: a P tag should contain phrasing content only. Also it breaks mpdf logic and makes links in PDF broken, so, it's impossible to click on the image. You know, in DokuWiki images are links to their full versions. So, in PDF right- or left-aligned images are links, and center-aligned are not .
Is it possible to rewrite this function to align images somehow else, without introducing new DIVs inside <a>?
The text was updated successfully, but these errors were encountered: