DrQuincy Posted September 26, 2023 Share Posted September 26, 2023 I've got this code: $field = wire('fields')->get('mySelectOptionsField'); $options = $field->type->getOptions($field); echo $options->first()->title; The echoed statement is not HTML-encoded. However, when you get select titles from $page rather than from $fields the title is HTML-encoded. I get that this is intended behaviour. I just wanted to check: When in the front-end and using the API is the general rule anything you get via $pages or $page has of set to true by default but anything else — such as my example above — there is no output formatting since that only applies in the context of pages Is there an in-built way to HTML-encoded from $options as above — or should I just used $sanitizer->entites()? Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now