Skip to content

Play nice with Nelmio/ApiDocBundle #20

@jaymecd

Description

@jaymecd

Affected versions: 1.x & 2.x

ApiDocBundle (2.13.2) embeds full jQuery lib as js payload directly into the <head> section.
This JS code contains following:

...
(f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close()
...

So GoogleTagManagerListener class (1.0.5 / 2.1.0) do not respect that and inject GTM into JS code, which is not real <body>.

Solution is to update regex from '/<body\b[^>]*>/' to '/<\/head>\s*<body\b[^>]*>/'.

Unfortunately could not provide PR right now, maybe later this week, if it won't be fixed earlier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions