René's URL Explorer Experiment


Title: </script> Malformed Script Tag After B2C Page Layout Version Upgrade Causes Loading Issues · Issue #493 · actions/github-script · GitHub

Open Graph Title: </script> Malformed Script Tag After B2C Page Layout Version Upgrade Causes Loading Issues · Issue #493 · actions/github-script

X Title: </script> Malformed Script Tag After B2C Page Layout Version Upgrade Causes Loading Issues · Issue #493 · actions/github-script

Description: Describe the bug After a B2C page layout version upgrade, the script tag for unified.min.js is not properly formatted when the page loads. Instead of closing correctly, the script tag appears as follows: https://sampledomain/static/conte...

Open Graph Description: Describe the bug After a B2C page layout version upgrade, the script tag for unified.min.js is not properly formatted when the page loads. Instead of closing correctly, the script tag appears as fo...

X Description: Describe the bug After a B2C page layout version upgrade, the script tag for unified.min.js is not properly formatted when the page loads. Instead of closing correctly, the script tag appears as fo...

Opengraph URL: https://github.com/actions/github-script/issues/493

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"\u0026lt;/script\u003e Malformed Script Tag After B2C Page Layout Version Upgrade Causes Loading Issues","articleBody":"**Describe the bug**\r\n\r\nAfter a B2C page layout version upgrade, the script tag for unified.min.js is not properly formatted when the page loads. Instead of closing correctly, the script tag appears as follows:\r\n\r\n**https://sampledomain/static/content/js/stage-2/unified.min.js?v=1728718798338\u003e\u0026lt;/script\u003e\u003c/script\u003e**\r\n\r\n**This results in a malformed tag with an extra \u003c/script\u003e, causing unexpected behavior.**\r\n\r\n**To Reproduce**\r\n\r\nSteps to reproduce the behavior:\r\n\r\nRun the commands: npm run build followed by npm run server to start the application.\r\nOnce the application is up and running, navigate to any page where the unified.min.js script should load.\r\nOpen the browser developer tools (right-click on the page and select \"Inspect\").\r\nIn the \"Network\" tab, check the script loading section, and we will observe a malformed script tag, as shown in the screenshots.\r\n\r\nInstead of loading properly, the script contains an extra closing tag (\u0026lt;/script\u003e), resulting in the following:\r\n\r\n\u003cscript src=\"https://sampledomain/static/content/js/stage-2/unified.min.js?v=1728718798338\"\u003e\u0026lt;/script\u003e\u003c/script\u003e\r\n\r\n\r\n**Expected behavior**\r\n\r\nThe script tag should load and close correctly without extra tags. Expected output:\r\nhttps://sampledomain/static/content/js/stage-2/unified.min.js?v=1728718798338\u003e\u003c/script\u003e\r\n\r\n\r\n**Screenshots**\r\n\r\n1) After B2C Page Layout Version Upgrade:\r\n\r\n\u003cimg width=\"610\" alt=\"image\" src=\"https://github.com/user-attachments/assets/939f52fd-d59d-44c0-b1a7-345630d8be89\"\u003e\r\n\r\n2) Working Screenshot (Older Version):\r\n\r\n\u003cimg width=\"575\" alt=\"image\" src=\"https://github.com/user-attachments/assets/46b15e93-c335-4ba9-8ce1-08c01cc5432b\"\u003e\r\n\r\n\r\n**Desktop (please complete the following information):**\r\n - Browser [e.g. chrome, safari]\r\n - Version [e.g. 22]\r\n\r\n\r\n\r\n**Additional context**\r\n\r\n**We've tried the following approaches to resolve the issue, but the problem persists:**\r\n\r\n**existing ::**\r\n\r\n**1. Webpack Configuration (HtmlWebpackPlugin):**\r\n    new HtmlWebpackPlugin({\r\n      filename: '../../../stage-2/unified.html',\r\n      template: path.resolve(__dirname, 'src/stage-2/unified.html'),\r\n      chunks: ['stage-2/unified.min'],\r\n      publicPath: '/static/content/js/',\r\n      inject: 'body'\r\n    }),\r\n\r\n**2) Content-Security-Policy (CSP) Headers**\r\n\r\n res.setHeader('Content-Security-Policy', \"default-src 'none'; script-src 'self' 'unsafe-inline'; connect-src 'self'; font-src 'self'; img-src 'self'; style-src 'self';base-uri 'self';form-action 'self'\");\r\n\r\n**3. Unified.html: Moved the script tags to the \u003chead\u003e section as recommended here.**\r\n\r\n\r\n\u003chead\u003e\r\n  \u003cscript type=\"text/javascript\"\u003e\r\n    let correlationId = '\u003c%= correlationId || \"defaultCorrelationId\" %\u003e';\r\n    $(\"document\").prevObject[0].childNodes.forEach(element =\u003e {\r\n      if (element.nodeType === 8 \u0026\u0026 element.nodeValue.includes(\"CorrelationId\")) {\r\n        correlationId = element.nodeValue.split(\":\")[1].trim();\r\n      }\r\n    });\r\n  \u003c/script\u003e\r\n\u003c/head\u003e\r\n\r\n\r\nhttps://learn.microsoft.com/en-us/azure/active-directory-b2c/javascript-and-page-layout?pivots=b2c-user-flow \r\n\r\n\u003cimg width=\"643\" alt=\"image\" src=\"https://github.com/user-attachments/assets/363f30a3-dcc3-4fa0-b6e2-3273668fbbf7\"\u003e\r\n\r\n\r\n**Existing Unified.html code ::**\r\n\r\n\u003chead\u003e\r\n\u003c/head\u003e\r\n\r\n\u003cbody class=\"idam unified\"\u003e\r\n\u003c!-- journey object here --\u003e\r\n\u003cscript type=\"text/javascript\"\u003e\r\n  let correlationId = ''\r\n  $(\"document\").prevObject[0].childNodes.forEach(element =\u003e {\r\n    if (element.nodeType === 8) {\r\n      if (element.nodeValue.includes(\"CorrelationId\")) {\r\n        correlationId = element.nodeValue.split(\":\")[1].trim();\r\n      }\r\n    }\r\n  });\r\n\u003c/script\u003e\r\n\u003c/body\u003e\r\n\r\n\u003c/html\u003e\r\n\r\n**Updated Webpack Configuration (HtmlWebpackPlugin):**\r\n\r\nnew HtmlWebpackPlugin({\r\n      filename: '../../../stage-2/unified.html',\r\n      template: path.resolve(__dirname, 'src/stage-2/unified.html'),\r\n      chunks: ['stage-2/unified.min'],\r\n      publicPath: '/static/content/js/',\r\n      inject: 'body',\r\n      xhtml: false,  // Ensures self-closing tags like \u003cscript /\u003e are properly formatted\r\n      minify: false,\r\n      templateParameters: {\r\n        correlationId: process.env.CORRELATION_ID || 'defaultCorrelationId', // Pass correlationId\r\n      },\r\n    }),\r\n\r\n**Updated CSP Headers:**\r\n res.setHeader('Content-Security-Policy',\r\n    \"default-src 'none'; \" +\r\n    \"script-src 'self'; \" + // Removed 'unsafe-inline' for better security\r\n    \"connect-src 'self'; \" +\r\n    \"font-src 'self'; \" +\r\n    \"img-src 'self'; \" +\r\n    \"style-src 'self' 'unsafe-inline'; \" +\r\n    \"base-uri 'self'; \" +\r\n    \"form-action 'self'; \" +\r\n    \"frame-ancestors 'none'; \" +\r\n    \"report-uri /csp-violation-report-endpoint;\"\r\n  );\r\n\r\nDespite these adjustments, the issue remains unresolved, and the script tag still appears malformed\r\n","author":{"url":"https://github.com/vikramAkram","@type":"Person","name":"vikramAkram"},"datePublished":"2024-10-12T12:33:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/493/github-script/issues/493"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:9c83af16-4b11-09a3-5939-be5b23c0f279
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBB08:9BDE:51F23B7:724D24A:6A50FFA2
html-safe-nonce94a3dd953211b17079f00a8b57003958579d9357c425cf68600701658717c3fb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQjA4OjlCREU6NTFGMjNCNzo3MjREMjRBOjZBNTBGRkEyIiwidmlzaXRvcl9pZCI6Ijg3ODA0MDEwMzg4NTMyMTAwMTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmace0e2f7ccb3a61ba0ff5b9808a2d3c1f3fe42f90a7a6679c6ca6d21976e7b3d76
hovercard-subject-tagissue:2582946617
github-keyboard-shortcutsrepository,issues,actions,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/actions/github-script/493/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f95997b4b6614566ab849d4b1ad8191a377cb9d400380d1130cb9058c25dbdca/actions/github-script/issues/493
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f95997b4b6614566ab849d4b1ad8191a377cb9d400380d1130cb9058c25dbdca/actions/github-script/issues/493
og:image:altDescribe the bug After a B2C page layout version upgrade, the script tag for unified.min.js is not properly formatted when the page loads. Instead of closing correctly, the script tag appears as fo...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamevikramAkram
hostnamegithub.com
expected-hostnamegithub.com
None38906a4da4e3e9fd88dfeacee232f5932c0c5f7495de3b4efc53ddfac7173d12
turbo-cache-controlno-preview
go-importgithub.com/actions/github-script git https://github.com/actions/github-script.git
octolytics-dimension-user_id44036562
octolytics-dimension-user_loginactions
octolytics-dimension-repository_id205262760
octolytics-dimension-repository_nwoactions/github-script
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id205262760
octolytics-dimension-repository_network_root_nwoactions/github-script
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release90441ea9b98e7491aa6ebcd135fccce4e2396f48
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/actions/github-script/issues/493#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Factions%2Fgithub-script%2Fissues%2F493
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Factions%2Fgithub-script%2Fissues%2F493
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=actions%2Fgithub-script
Reloadhttps://github.com/actions/github-script/issues/493
Reloadhttps://github.com/actions/github-script/issues/493
Reloadhttps://github.com/actions/github-script/issues/493
Please reload this pagehttps://github.com/actions/github-script/issues/493
actions https://github.com/actions
github-scripthttps://github.com/actions/github-script
Notifications https://github.com/login?return_to=%2Factions%2Fgithub-script
Fork 572 https://github.com/login?return_to=%2Factions%2Fgithub-script
Star 5k https://github.com/login?return_to=%2Factions%2Fgithub-script
Code https://github.com/actions/github-script
Issues 54 https://github.com/actions/github-script/issues
Pull requests 35 https://github.com/actions/github-script/pulls
Discussions https://github.com/actions/github-script/discussions
Actions https://github.com/actions/github-script/actions
Security and quality 0 https://github.com/actions/github-script/security
Insights https://github.com/actions/github-script/pulse
Code https://github.com/actions/github-script
Issues https://github.com/actions/github-script/issues
Pull requests https://github.com/actions/github-script/pulls
Discussions https://github.com/actions/github-script/discussions
Actions https://github.com/actions/github-script/actions
Security and quality https://github.com/actions/github-script/security
Insights https://github.com/actions/github-script/pulse
</script> Malformed Script Tag After B2C Page Layout Version Upgrade Causes Loading Issueshttps://github.com/actions/github-script/issues/493#top
invalidhttps://github.com/actions/github-script/issues?q=state%3Aopen%20label%3A%22invalid%22
https://github.com/vikramAkram
vikramAkramhttps://github.com/vikramAkram
on Oct 12, 2024https://github.com/actions/github-script/issues/493#issue-2582946617
https://sampledomain/static/content/js/stage-2/unified.min.js?v=1728718798338></script>https://sampledomain/static/content/js/stage-2/unified.min.js?v=1728718798338%3E</script%3E
https://sampledomain/static/content/js/stage-2/unified.min.js?v=1728718798338>https://sampledomain/static/content/js/stage-2/unified.min.js?v=1728718798338%3E
https://private-user-images.githubusercontent.com/184620647/375956522-939f52fd-d59d-44c0-b1a7-345630d8be89.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODM2OTM1MTgsIm5iZiI6MTc4MzY5MzIxOCwicGF0aCI6Ii8xODQ2MjA2NDcvMzc1OTU2NTIyLTkzOWY1MmZkLWQ1OWQtNDRjMC1iMWE3LTM0NTYzMGQ4YmU4OS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNzEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDcxMFQxNDIwMThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jODY2N2UxNzk2ZGVkZjEwMjQ5ODM2OGY5MjBkNTQzY2E5ZTdiMjgzYmM4NjBjMTEwYmEyMDUwZDM1ZWU0YTg0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.3nrxIt1THmpm3Mio4Dq9oDZz0z0HGjSW8DwzDJf1ykQ
https://private-user-images.githubusercontent.com/184620647/375956595-46b15e93-c335-4ba9-8ce1-08c01cc5432b.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODM2OTM1MTgsIm5iZiI6MTc4MzY5MzIxOCwicGF0aCI6Ii8xODQ2MjA2NDcvMzc1OTU2NTk1LTQ2YjE1ZTkzLWMzMzUtNGJhOS04Y2UxLTA4YzAxY2M1NDMyYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNzEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDcxMFQxNDIwMThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00NWRmY2JlYzY0NzljMTU3YWI2ZDhiMmNjZGZlZTIwMDI5NzliMjRiYTRhNDRiYmZmNzM4OWY1Y2ZmZWIyNjI5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.boB5oS4PZEcPQl15N-E8Y19FZzVQds2gBc61fdksAKk
https://learn.microsoft.com/en-us/azure/active-directory-b2c/javascript-and-page-layout?pivots=b2c-user-flowhttps://learn.microsoft.com/en-us/azure/active-directory-b2c/javascript-and-page-layout?pivots=b2c-user-flow
https://private-user-images.githubusercontent.com/184620647/375956771-363f30a3-dcc3-4fa0-b6e2-3273668fbbf7.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODM2OTM1MTgsIm5iZiI6MTc4MzY5MzIxOCwicGF0aCI6Ii8xODQ2MjA2NDcvMzc1OTU2NzcxLTM2M2YzMGEzLWRjYzMtNGZhMC1iNmUyLTMyNzM2NjhmYmJmNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNzEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDcxMFQxNDIwMThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03ZDVkNmEwMTAxNGQzZmI3OGM4YzdlMmNmMDk3MmU0YzYzNTRhYmYwYmFkNWQyNDNkNmZiYmU0OGMyOTcyZjczJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.g_ZdLrTRLU6GLygxEXgsz0wTVFRIrSLFg_Gfwl8mDHY
invalidhttps://github.com/actions/github-script/issues?q=state%3Aopen%20label%3A%22invalid%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.