Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem about "pre" tag that contains a string beginning with "[" or "{" #275

Open
gypark opened this issue May 16, 2024 · 0 comments
Open

Comments

@gypark
Copy link

gypark commented May 16, 2024

(Maybe someone has reported it already but...)

Hello,

Today I found this plugin modifies a plain html, if it contains a <pre> tag in which a string begins with [ or {.

  • Windows 10

  • Chrome 124.0.6367.207 (64bits)

  • Version: 0.7.3

  • HTML file for test:

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
</head>
<body>
<h1>Title</h1>

Body Text

<pre style="border: 1px solid red;">
[ begin with a bracket, but not JSON
</pre>

</body>
</html>
  • When this plugin is disabled:

image

  • When enabled:

image

  • In the developer's tool: pre tag is moved into the first place in body

image

It seems that JSON formatter tries to format the string in the pre tag and failed because the string isn't a valid JSON.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant