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

Great than character in theme template causing issues #160

Closed
Alex-Hay opened this issue Apr 27, 2023 · 6 comments
Closed

Great than character in theme template causing issues #160

Alex-Hay opened this issue Apr 27, 2023 · 6 comments

Comments

@Alex-Hay
Copy link

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.

.blade.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.
.blade.php <div class='[&>*]:mb-0'></div> or <div class='>'></div>

This isn't the case for other template files outside of the ACF Composer template files. It only applies to views>blocks>**.blade.php

Thanks for your hard work on acf-composer!

@Log1x
Copy link
Owner

Log1x commented Apr 28, 2023

Interesting.

Does it happen if you set jsx to false?

The only thing I can think of is it being some sort of bug with how ACF parses InnerContent/jsx inside of the template.

@Alex-Hay
Copy link
Author

Hi @Log1x, thanks for your quick response.

I tried it without jsx and the same bug occurred. I also setup a new install, adding a simple ACF block to the twentytwentythree theme and ran into the same bug – so it must be on ACF's end.

I'll submit an issue on the ACF repo, thanks for your help!

@orlockz
Copy link

orlockz commented Apr 28, 2023

I ran into the exact same problem a few days ago. I tried using ">" (larger than) in an inline javascript function. (Using alpinejs)
I couldn't understand why the closing " turned into ” on the element.

Thanks you guys. I thought I was the problem.. 😄

@Log1x
Copy link
Owner

Log1x commented Apr 28, 2023

AdvancedCustomFields/acf#822 here's Alex's issue 💪 . I'm curious about their response. I think I've accidentally ran into this before as well.

@SergiArias
Copy link

It's a coincidence that we posted almost at the same time haha...

A workaround is to use the html entity: &gt; instead of >

@Alex-Hay
Copy link
Author

Alex-Hay commented Jun 2, 2023

I've just heard back from ACF on this. This seems to be an issue with wptexturize, and has popped up in a few issues:

WordPress/gutenberg/issues/15636
WordPress/gutenberg/pull/9963

It sounds like the ACF team are looking into a solution on there end (🤞), but it may only be resolvable in WP core.

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

4 participants