I want to be able to copy the code from Google Maps and show that on my post. Currently, WordPress sanitizes dynamic HTML output for security, preventing iframes from rendering. This feature would allow users to embed Google Maps directly into their posts without needing custom code or plugins.
I am using JetEngine and Elementor Pro. I want to be able to copy the code from Google Maps, the Share -> Embed a Map -> Copy HTML, and show that on my post. I create a Custom Post Type, and a Meta field, Object type: Field, Field type: Text area, and paste the code provided by Google Maps in there. It sounds simple enough that you then add the HTML widget in Elementor Pro, and then get the iframe code from the Meta field. But after trying several solutions around this for a couple of hours, I have not been successful. From what I can gather, WordPress has security features that prevent iframe code from rendering. Grok words it like this: WordPress and Elementor sanitize dynamic HTML output for security, stripping iframes to prevent vulnerabilities, so raw embeds from meta fields don't render without custom code or plugins. What is a best practice to have this done please? I want to be able to show "Govan Mbeki Municipality", but this is a region and a building, so the standard Google Maps widget in Elementor Pro shows the region.