PluginProbe
HubSpot All-In-One Marketing – Forms, Popups, Live Chat / 11.3.75
HubSpot All-In-One Marketing – Forms, Popups, Live Chat v11.3.75
11.3.75 11.3.73 11.3.71 11.3.70 11.3.69 11.3.64 11.3.65 11.3.62 11.3.61 11.3.56 11.3.58 11.0.31 11.0.52 11.0.54 11.0.56 11.0.58 11.0.7 11.1.10 11.1.11 11.1.13 11.1.14 11.1.15 11.1.2 11.1.20 11.1.21 All 73 releases
← All changes | public/class-pagehooks.php +6 -2 11.1.2111.3.75 View file →
@@ -118,9 +118,13 @@
118 118 * @param String $handle handle.
119 119 */
120 120 public function add_id_to_tracking_code( $tag, $handle ) {
121 121 if ( AssetsManager::TRACKING_CODE === $handle ) {
122 - $tag = str_replace( "id='" . $handle . "-js'", "async defer id='hs-script-loader'", $tag );
122 + $tag = preg_replace(
123 + '/id=[\'"]' . preg_quote( $handle . '-js', '/' ) . '[\'"]/',
124 + "async defer id='hs-script-loader'",
125 + $tag
126 + );
123 127 }
124 128 return $tag;
125 129 }
126 130
@@ -130,9 +134,9 @@
130 134 * @param String $tag tag name.
131 135 * @param String $handle handle.
132 136 */
133 137 public function add_defer_to_forms_script( $tag, $handle ) {
134 - if ( AssetsManager::FORMS_SCRIPT === $handle ) {
138 + if ( AssetsManager::FORMS_SCRIPT === $handle || AssetsManager::FORMS_V4_SCRIPT === $handle ) {
135 139 $tag = str_replace( 'src', 'defer src', $tag );
136 140 }
137 141 return $tag;
138 142 }