GravityPDF / querypath

A fork of QueryPath: a PHP library for HTML(5)/XML querying (CSS 4 or XPath) and processing (like jQuery) with PHP8.3 support
Other
21 stars 2 forks source link

html() shouldn't return own tag #16

Closed jakejackson1 closed 1 year ago

jakejackson1 commented 1 year ago

From querypath created by neyaoz: technosophos/querypath#121

First of all, THANK YOU!

I am adding suffix to title by this way:

$qp->find('title')->html(
    $qp->find('title')->html() . ' (Suffix)'
);

Return is:

<title><title>Example Title</title> (Suffix)</title>

I can use innerHTML() for same job, but in jQuery don't return own tag and they says This method uses the browser's innerHTML property about html() method in API site. I think you should create outerHTML() method for results with own tag.

jakejackson1 commented 1 year ago

I need to check on this again, but I think the report is right. Should add this to the next QueryPath release.