René's URL Explorer Experiment


Title: `string`s in the output of `highlight` function with `html: true` maybe malformed · Issue #90 · scriptcoded/sql-highlight · GitHub

Open Graph Title: `string`s in the output of `highlight` function with `html: true` maybe malformed · Issue #90 · scriptcoded/sql-highlight

X Title: `string`s in the output of `highlight` function with `html: true` maybe malformed · Issue #90 · scriptcoded/sql-highlight

Description: Describe the bug strings in the output of highlight function with html: true maybe malformed when the sql query contains special characters in hardcoded string It seems that the special characters should be escaped in the output To Repro...

Open Graph Description: Describe the bug strings in the output of highlight function with html: true maybe malformed when the sql query contains special characters in hardcoded string It seems that the special characters ...

X Description: Describe the bug strings in the output of highlight function with html: true maybe malformed when the sql query contains special characters in hardcoded string It seems that the special characters ...

Opengraph URL: https://github.com/scriptcoded/sql-highlight/issues/90

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`string`s in the output of `highlight` function with `html: true` maybe malformed","articleBody":"**Describe the bug**\r\n`string`s in the output of `highlight` function with `html: true` maybe malformed when the sql query contains special characters in hardcoded string\r\nIt seems that the special characters should be escaped in the output\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n- Use code below\r\n```\r\nconst { highlight } = require('sql-highlight')\r\nlet sqlString = \"select * from a where b = 'array\u003cmap\u003cstring,string\u003e\u003e';\"\r\nlet highlighted = highlight(sqlString, { html: true })\r\nconsole.log(highlighted)\r\n```\r\n- And execute it with nodejs\r\n\r\n**Actual behavior**\r\n- It prints\r\n`\u003cspan class=\"sql-hl-keyword\"\u003eselect\u003c/span\u003e \u003cspan class=\"sql-hl-special\"\u003e*\u003c/span\u003e \u003cspan class=\"sql-hl-keyword\"\u003efrom\u003c/span\u003e a \u003cspan class=\"sql-hl-keyword\"\u003ewhere\u003c/span\u003e b \u003cspan class=\"sql-hl-special\"\u003e=\u003c/span\u003e \u003cspan class=\"sql-hl-string\"\u003e'array\u003cmap\u003cstring,string\u003e\u003e'\u003c/span\u003e\u003cspan class=\"sql-hl-special\"\u003e;\u003c/span\u003e`\r\n- And if I try to put the **\u003cspan class=\"sql-hl-string\"\u003e'array\u003cmap\u003cstring,string\u003e\u003e'\u003c/span\u003e** into html\r\nThe browser will treat it as\r\n![image](https://user-images.githubusercontent.com/906877/212267127-91779bfe-ad7e-47b0-b5bd-bd1d6e2c8d8f.png)\r\nAnd user will see\r\n![image](https://user-images.githubusercontent.com/906877/212267601-8c3e6d33-60fd-4300-8005-78a5fc0169a5.png)\r\n\r\n**Expected behavior**\r\n- It prints\r\n`\u003cspan class=\"sql-hl-keyword\"\u003eselect\u003c/span\u003e \u003cspan class=\"sql-hl-special\"\u003e*\u003c/span\u003e \u003cspan class=\"sql-hl-keyword\"\u003efrom\u003c/span\u003e a \u003cspan class=\"sql-hl-keyword\"\u003ewhere\u003c/span\u003e b \u003cspan class=\"sql-hl-special\"\u003e=\u003c/span\u003e \u003cspan class=\"sql-hl-string\"\u003e'array\u0026ltmap\u0026ltstring,string\u0026gt\u0026gt'\u003c/span\u003e\u003cspan class=\"sql-hl-special\"\u003e;\u003c/span\u003e`\r\n- And if I put the **\u003cspan class=\"sql-hl-string\"\u003e'array\u0026ltmap\u0026ltstring,string\u0026gt\u0026gt'\u003c/span\u003e** into html\r\nThe browser will treat it as\r\n![image](https://user-images.githubusercontent.com/906877/212267903-8d74d729-e51d-49cf-9e4c-50f1c368e34e.png)\r\nAnd user will see\r\n![image](https://user-images.githubusercontent.com/906877/212267947-f3d928af-2f9b-4773-8cab-5c1ce5f19fa9.png)\r\n\r\n**Node.js (please complete the following information):**\r\n - Version v16.17.1\r\n\r\n**Browser (please complete the following information):**\r\n - OS: MacOS\r\n - Browser Chrome\r\n - Version 108.0.5359.124\r\n","author":{"url":"https://github.com/SidneyTTW","@type":"Person","name":"SidneyTTW"},"datePublished":"2023-01-13T08:45:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/90/sql-highlight/issues/90"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:77652672-e42a-516e-10d5-811dc6448f8f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDB18:307977:239F75F:2EBD9BF:698196C7
html-safe-nonce2320c08920078470f1f3b3d6515743515c2030bfdcdc2f1f953408abc02cf4e4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjE4OjMwNzk3NzoyMzlGNzVGOjJFQkQ5QkY6Njk4MTk2QzciLCJ2aXNpdG9yX2lkIjoiNDgwODU0MDQ2NDYxNTYyNjQzOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac274cfe0d2990fe688490429dbcf04cefea1b556055e26184d9127215a83b6da3
hovercard-subject-tagissue:1531924649
github-keyboard-shortcutsrepository,issues,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/scriptcoded/sql-highlight/90/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9250cd4207e1b2d42e3884c6528e33c3c542fbe22620f3fb69503c36f3463912/scriptcoded/sql-highlight/issues/90
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9250cd4207e1b2d42e3884c6528e33c3c542fbe22620f3fb69503c36f3463912/scriptcoded/sql-highlight/issues/90
og:image:altDescribe the bug strings in the output of highlight function with html: true maybe malformed when the sql query contains special characters in hardcoded string It seems that the special characters ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameSidneyTTW
hostnamegithub.com
expected-hostnamegithub.com
Nonee137814e266030874fd2c86863529d0622b13889eeda04148c57654b6ea84ad6
turbo-cache-controlno-preview
go-importgithub.com/scriptcoded/sql-highlight git https://github.com/scriptcoded/sql-highlight.git
octolytics-dimension-user_id6452991
octolytics-dimension-user_loginscriptcoded
octolytics-dimension-repository_id147309066
octolytics-dimension-repository_nwoscriptcoded/sql-highlight
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id147309066
octolytics-dimension-repository_network_root_nwoscriptcoded/sql-highlight
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
releasedd58d68a7813bbec9c91422c8c35f4af33832d70
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/scriptcoded/sql-highlight/issues/90#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fscriptcoded%2Fsql-highlight%2Fissues%2F90
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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/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%2Fscriptcoded%2Fsql-highlight%2Fissues%2F90
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=scriptcoded%2Fsql-highlight
Reloadhttps://github.com/scriptcoded/sql-highlight/issues/90
Reloadhttps://github.com/scriptcoded/sql-highlight/issues/90
Reloadhttps://github.com/scriptcoded/sql-highlight/issues/90
scriptcoded https://github.com/scriptcoded
sql-highlighthttps://github.com/scriptcoded/sql-highlight
Please reload this pagehttps://github.com/scriptcoded/sql-highlight/issues/90
Notifications https://github.com/login?return_to=%2Fscriptcoded%2Fsql-highlight
Fork 14 https://github.com/login?return_to=%2Fscriptcoded%2Fsql-highlight
Star 42 https://github.com/login?return_to=%2Fscriptcoded%2Fsql-highlight
Code https://github.com/scriptcoded/sql-highlight
Issues 0 https://github.com/scriptcoded/sql-highlight/issues
Pull requests 0 https://github.com/scriptcoded/sql-highlight/pulls
Actions https://github.com/scriptcoded/sql-highlight/actions
Security 0 https://github.com/scriptcoded/sql-highlight/security
Insights https://github.com/scriptcoded/sql-highlight/pulse
Code https://github.com/scriptcoded/sql-highlight
Issues https://github.com/scriptcoded/sql-highlight/issues
Pull requests https://github.com/scriptcoded/sql-highlight/pulls
Actions https://github.com/scriptcoded/sql-highlight/actions
Security https://github.com/scriptcoded/sql-highlight/security
Insights https://github.com/scriptcoded/sql-highlight/pulse
New issuehttps://github.com/login?return_to=https://github.com/scriptcoded/sql-highlight/issues/90
New issuehttps://github.com/login?return_to=https://github.com/scriptcoded/sql-highlight/issues/90
#91https://github.com/scriptcoded/sql-highlight/pull/91
strings in the output of highlight function with html: true maybe malformedhttps://github.com/scriptcoded/sql-highlight/issues/90#top
#91https://github.com/scriptcoded/sql-highlight/pull/91
https://github.com/SidneyTTW
https://github.com/SidneyTTW
SidneyTTWhttps://github.com/SidneyTTW
on Jan 13, 2023https://github.com/scriptcoded/sql-highlight/issues/90#issue-1531924649
https://user-images.githubusercontent.com/906877/212267127-91779bfe-ad7e-47b0-b5bd-bd1d6e2c8d8f.png
https://user-images.githubusercontent.com/906877/212267601-8c3e6d33-60fd-4300-8005-78a5fc0169a5.png
https://user-images.githubusercontent.com/906877/212267903-8d74d729-e51d-49cf-9e4c-50f1c368e34e.png
https://user-images.githubusercontent.com/906877/212267947-f3d928af-2f9b-4773-8cab-5c1ce5f19fa9.png
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.