Skip to content

Commit

Permalink
DOC Use HTMLValue
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Jun 7, 2023
1 parent 225bf1c commit ffbd597
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -361,7 +361,7 @@ one preview state.

```php
use SilverStripe\Control\Controller;
use SilverStripe\View\Parsers\HTML4Value;
use SilverStripe\View\Parsers\HTMLValue;

class ProductPage extends Page
{
Expand All @@ -382,7 +382,7 @@ class ProductPage extends Page
$controller = Controller::curr();
$request = $controller->getRequest();
if ($request->getVar('DataObjectPreview') !== null) {
$html = HTML4Value::create($tags);
$html = HTMLValue::create($tags);
$xpath = "//meta[@name='x-page-id' or @name='x-cms-edit-link']";
$removeTags = $html->query($xpath);
$body = $html->getBody();
Expand Down

0 comments on commit ffbd597

Please sign in to comment.