AdvancedCustomFields / AdvancedCustomFields/acf

Greater than character in theme templates causing issues

Open
#822 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
945
Forks
197
PR merge metrics
No merged PRs in 30d

Description

Hi there,

A bit of an unusual one; i'm finding that using the greater than characters in quotes is removing the closing double quote (") and replacing it with a double prime character (″) – causing issues in the HTML.

.php <div class="[&>*]:mb-0"></div> or <div class=">"></div>
becomes
.html <div class="[&>*]:mb-0″></div> or <div class=">″></div>

The below just causes an error.
.php <div class='[&>*]:mb-0'></div> or <div class='>'></div>

This issue only applies to ACF template files and not other templates in the theme.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported cases in ACF template files, comparing the PHP input with the generated HTML for greater-than characters inside single and double quotes. Trace the ACF template-processing entry point; done means both quoted forms preserve their closing quotes and no template error occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.