Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Add the option to generate HTML fragments and the body of an HTML document #1238

Closed
wants to merge 3 commits into from

Conversation

WillGibson
Copy link

Takes work done by @rudkjobing to allow for generating HTML without it needing to be a complete HTML document.

Then issue of it sometimes creating HTML with no human readable text content was addressed and builds got passing again on the various versions of PHP.

@WillGibson
Copy link
Author

@fzaninotto I appreciate that the commit history has gotten itself a bit loose in here. I'll have a go at rebasing this on your master maybe to see if I can straighten that up.

@WillGibson WillGibson mentioned this pull request Jun 21, 2017
@WillGibson WillGibson force-pushed the fake_html_body branch 2 times, most recently from 80d955e to e983da8 Compare June 22, 2017 08:48
Copy link
Owner

@fzaninotto fzaninotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need another rebase

*/
private function addUniqueIdAttribute(\DOMElement $node)
{
for ($x = 1; $x <= 10000; $x++) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better use a while than a for that you'll break. Oh, and you're free to use recursion by the way.

@WillGibson
Copy link
Author

I just stumbled across this PR and it's so old I can't even remember anything about it's context, so I'm closing it.

@WillGibson WillGibson closed this Jul 24, 2019
@clarkewing
Copy link

Hey @WillGibson, any chance of reviving this?
I've got quite a few use cases for generating HTML fragments, and my current implementation using regex to extract everything between the <body> tags is... iffy.

@WillGibson
Copy link
Author

I'm afraid I don't have time to look at it and, if I'm being honest, aside from it being do long ago I can't remember it, I'm not using this library for anything at the moment, or even PHP just now.

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

Successfully merging this pull request may close these issues.

4 participants