Skip to main content
Solved

Edge/Chrome won't display embedded iFrame PDF in Freshdesk but will in Freshservice

  • November 12, 2024
  • 1 reply
  • 68 views

I am migrating a plethora of PDF documents from an old knowledge base and trying to embed them in new solution articles using iFrame. Freshdesk editor appends “sandbox="allow-scripts allow-forms allow-same-origin allow-presentation” which results in Chrome and Edge displaying “This page has been blocked by Edge”. 

If I do the same thing in Freshservice with an embedded iFrame PDF it works perfectly in Edge and Chrome and the editor does not append sandbox settings to the end of the code.

Is there a setting in Freshdesk that I can turn off to prevent the code being appended?

Thanks in advance for any assistance. 

Best answer by mahendarsingh

Hi ​@REH62 

Thank you for bringing this up. 

Freshdesk automatically appends the sandbox attribute to embedded iFrames for security reasons, and currently, there is no direct setting to disable this behavior. The sandbox attribute is added to restrict and secure the embedded iFrame’s interactions. Unfortunately, this restriction can cause issues with PDFs being embedded using iFrames, leading to browsers like Chrome and Edge blocking rendering due to enhanced security measures.

For this scenario, you can consider the following workaround:

  1. Host the PDF files on a secure server (e.g., Google Drive, Dropbox, or a file hosting service) and use hyperlinks in solution articles, rather than embedding them with iFrames. This avoids triggering security restrictions.
  2. Alternatively, if embedding the PDF is critical, you may need to make customizations in the portal theme using the Admin > Portals > Customize > Edit Theme feature. You might be able to modify how the sandbox attribute is rendered, though this might be limited due to Freshdesk's default constraints.
  3. For differences between Freshdesk and Freshservice in this behavior, it could be worthwhile to escalate this as feedback to check if feature parity is possible.

For the new_ticket_form dropdown change to a card view:

  1. Go to Admin > Portals > Customize > Edit Theme and navigate to the section where the ticket form is rendered.
  2. Modify the theme’s CSS or HTML to replace dropdown fields with card-style components. You can use custom code and styles to convert dropdown fields into interactive card-like elements.
  3. If advanced design changes are required, consider involving a developer or an SI partner familiar with Freshdesk customization for better implementation of the card view design.
View original
Did this topic help you find an answer to your question?

1 reply

mahendarsingh
Community Manager
Forum|alt.badge.img+8
  • Community Manager
  • 117 replies
  • Answer
  • March 31, 2025

Hi ​@REH62 

Thank you for bringing this up. 

Freshdesk automatically appends the sandbox attribute to embedded iFrames for security reasons, and currently, there is no direct setting to disable this behavior. The sandbox attribute is added to restrict and secure the embedded iFrame’s interactions. Unfortunately, this restriction can cause issues with PDFs being embedded using iFrames, leading to browsers like Chrome and Edge blocking rendering due to enhanced security measures.

For this scenario, you can consider the following workaround:

  1. Host the PDF files on a secure server (e.g., Google Drive, Dropbox, or a file hosting service) and use hyperlinks in solution articles, rather than embedding them with iFrames. This avoids triggering security restrictions.
  2. Alternatively, if embedding the PDF is critical, you may need to make customizations in the portal theme using the Admin > Portals > Customize > Edit Theme feature. You might be able to modify how the sandbox attribute is rendered, though this might be limited due to Freshdesk's default constraints.
  3. For differences between Freshdesk and Freshservice in this behavior, it could be worthwhile to escalate this as feedback to check if feature parity is possible.

For the new_ticket_form dropdown change to a card view:

  1. Go to Admin > Portals > Customize > Edit Theme and navigate to the section where the ticket form is rendered.
  2. Modify the theme’s CSS or HTML to replace dropdown fields with card-style components. You can use custom code and styles to convert dropdown fields into interactive card-like elements.
  3. If advanced design changes are required, consider involving a developer or an SI partner familiar with Freshdesk customization for better implementation of the card view design.

Reply