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

Image tag breaks with smartypants enabled #6344

Open
medienbaecker opened this issue Mar 12, 2024 · 0 comments
Open

Image tag breaks with smartypants enabled #6344

medienbaecker opened this issue Mar 12, 2024 · 0 comments
Assignees
Labels
type: bug 🐛 Is a bug; fixes a bug
Milestone

Comments

@medienbaecker
Copy link
Contributor

medienbaecker commented Mar 12, 2024

Description

I like using the smartypants option to have typographically correct quotes. This can however break the usage of the (image: ) kirbytag.

Output

<img alt="Test with "quotes"" src="(…)/test.png">

Output with more/less quotes (now it gets weird)

<img alt=&#8221;Test with &#8220;quotes&#8221; src=&#8221;(…)/test.png&#8221;>

Expected Output

<img alt="Test with &quot;quotes&quot;" src="(…)test.png">

To reproduce

  1. Upload an image
  2. Use the (image: ) tag to insert this image in a textarea
  3. Add an alt text in the file content or image tag (it doesn't matter)
  4. Turn the textarea into kirbytext with ->kirbytext()
  5. Enable smartypants in the config
  6. See error

Your setup

Kirby Version
4.1.2

@distantnative distantnative self-assigned this Mar 23, 2024
@distantnative distantnative added the type: bug 🐛 Is a bug; fixes a bug label Mar 23, 2024
@distantnative distantnative added this to the 4.2.0 milestone Mar 23, 2024
distantnative added a commit that referenced this issue Mar 23, 2024
@distantnative distantnative linked a pull request Mar 23, 2024 that will close this issue
5 tasks
@bastianallgeier bastianallgeier modified the milestones: 4.2.0, 4.2.x Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Is a bug; fixes a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants