Skip to content

Fix broken HTML before it is parsed #39

Answered by pboese
pboese asked this question in Q&A
Discussion options

You must be logged in to vote

Solved. Request middleware with something like:

public function handleResponse(Response $response): Response
{
    $body = str_replace('messed up html', '', $response->getBody());

    return $response->withBody($body);
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pboese
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant