I have two fields formatted as rich text/html. I use these fields to paste a map embed code. The problem I'm having is that whenever I make any changes in the table and save changes, the embed code is changed by the app.
The embed code should look like this:
<iframe src="https://www.google.com/maps/d/embed?mid ... hbc=2E312F" width="640" height="480"></iframe>
But whenever I save changes in the app the embed code is changed to this:
<iframe sandbox="" src="https://www.google.com/maps/d/embed?mid ... hbc=2E312F" width="640" height="480"></iframe>
The maps show just fine if I enter them directly into the fields via PhpMyAdmin. But, if a make any changes to anything in the table and save changes, the embed code is changed. I have tried other text formats with no luck.
I don't want to use Google Maps. I use MyMaps which is a Google tool also but is much more preferable to me.
Please help....
AppGini Modifying embed code
Re: AppGini Modifying embed code
My experimenting shows that every time I make a change in the app the word "sandbox" is added to my embed code? This word is added every time I save changes. Hopefully someone can guide me to eliminate this.
Re: AppGini Modifying embed code
Update: I reverted to Version 5.98 and the problem persists. I then reverted to version 5.97 and the problem is gone.
Re: AppGini Modifying embed code
Might not be solution to your problem but I had an issue with embedding on my text editor (CK Editor) that I use instead of NICEDIT, code was being altered. It was also happened between version 5.97 & 5.98
See: viewtopic.php?f=11&t=4224&p=16706#p16706
As said might not be related but maybe worth a try to edit your ci_input.php file by removing the 'style' entries?
See: viewtopic.php?f=11&t=4224&p=16706#p16706
As said might not be related but maybe worth a try to edit your ci_input.php file by removing the 'style' entries?
Ron - Gloucestershire, UK: AppGini Pro V 23.15 Rev 1484 - LOVING IT!
Plugins: Mass Update + Search Page Maker + Summary Reports + Calendar + Messages
Bizzworxx: AppGiniHelper + Inline Detail View
Alejandro Landini: To-Do List + MPI + TV Field Editor
Other: Udemy Course
Plugins: Mass Update + Search Page Maker + Summary Reports + Calendar + Messages
Bizzworxx: AppGiniHelper + Inline Detail View
Alejandro Landini: To-Do List + MPI + TV Field Editor
Other: Udemy Course
Re: AppGini Modifying embed code
Thank you, I'll look at that.
Re: AppGini Modifying embed code
Sandbox is a security attribute for iframe: https://developer.mozilla.org/en-US/doc ... tr-sandbox
In Appgini V22.11 the (new) sandbox attribute appears to be added in admin/IncFunctions.php in this function:
The sandbox attribute that is added to the <iframe> doesn't appear to have any values and that would be preventing your iframe from displaying.
I'm not sure which sandbox value is missing that's preventing your iframe from displaying but you could try editing the code I mentioned above in admin/incFunctions.php as follows. This will allow just about everything. Try deleting values until you have what's required?
Hopefully that might help?
PS: Don't forget you'll need to replace/edit that file again if you ever regenerate your app.
In Appgini V22.11 the (new) sandbox attribute appears to be added in admin/IncFunctions.php in this function:
Code: Select all
// sandbox iframes
$str = preg_replace('/(<|<)iframe(.*?)(>|>)/i', '$1iframe sandbox $2$3', $str);
I'm not sure which sandbox value is missing that's preventing your iframe from displaying but you could try editing the code I mentioned above in admin/incFunctions.php as follows. This will allow just about everything. Try deleting values until you have what's required?
Code: Select all
// sandbox iframes
$str = preg_replace('/(<|<)iframe(.*?)(>|>)/i', '$1iframe sandbox="allow-modals allow-forms allow-scripts allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox" $2$3', $str);
PS: Don't forget you'll need to replace/edit that file again if you ever regenerate your app.
Re: AppGini Modifying embed code
It's not that the app is simply adding "sandbox", but that it gets added every time I save changes in the table. So, for instance, if I save changes five times, the word "sandbox is injected into the <iframe> code five times as well. That breaks the embed code. Once for "sandbox is fine, but every time I save changes has got to be a bug.
Re: AppGini Modifying embed code
Using Notepad++ and doing a word search for "iframe" or "sandbox" in the admin/incFunctions.php file, I get no results. Are you sure it's that file? Also, I'm using ver. 22.12
Re: AppGini Modifying embed code
This is what is happening when I use Version 22.12. Each time changes are made in a table the word "sandbox" gets inserted into the iframe embed code. It's a real pain.
Re: AppGini Modifying embed code
I stand corrected! I realized that on one computer I have been using the reverted Version 5.97 and on my office computer the 22.12 version. The 5.97 version that I was doing the search on didn't have the string in the incFunctions.php you detailed.
But I did locate it in ver 22.12 and commented out the sandbox line and viola, it works! It would be a nice fix for Ahmed to add in the next version, as I like the new 22.12. Thank you for your help....
Ray
But I did locate it in ver 22.12 and commented out the sandbox line and viola, it works! It would be a nice fix for Ahmed to add in the next version, as I like the new 22.12. Thank you for your help....
Ray
Re: AppGini Modifying embed code
Yes, having tested I now see what you mean about the multiple sandbox being added on each save.
Agreed, that would be a bug.
Agreed, that would be a bug.