By default, Pressbooks prohibits the use of iframes from most third-party media sources to prevent malicious users from embedding harmful content inside of a book. However, Pressbooks Network Managers can add trusted domains to a whitelist, allowing users to embed iframes from these external sites to their books. This chapter will cover:
Until a media source is whitelisted, no user with permissions lower than Network Manager can embed that content into their Pressbooks books using an iframe embed code. However, Network Managers can whitelist an iframe source at any time from their Network Admin Dashboard. More detailed instructions for doing so can be found here.
- Navigate to the Pressbooks Network Admin Dashboard
- From the left sidebar menu, select Settings > Network Options
- Select the ‘Network Defaults’ tab and paste in the domain or path that you intend to whitelist into the Iframe Whitelist form. Guidelines for the expected input format are included below the input field.
- Click Save Changes
Once you have saved changes to your iframe whitelist, any iframe whose src attribute matches a domain or path on your whitelist will pass through our security filter and can be added to a book by any user on the network. Please note that content cloned from other networks may include iframes from sources which have not been whitelisted on your network. If this is the case, these iframes will not display in the cloned book.
Some media sources have been vetted and added to our global Pressbooks whitelist. These are media sources we’ve deemed to be safe. Iframes from globally whitelisted sources can be embedded on any Pressbooks network by any user.
Because iframes can be used to embed malicious content into a book, they can pose a potential risk to readers on your network, especially when they come from sources which have not been properly vetted. We simply caution network managers to only whitelist trusted media sources.
This feature allows users to add interactive media to a book from anywhere on the internet as long as a network manager has whitelisted it across the network, including media sources that the Pressbooks team isn’t familiar with. We’re happy to offer this feature, but we are unable to offer technical support for any bugs that affect media from network manager-whitelisted sources.
You can safely embed all sorts of media in Pressbooks not mentioned in this chapter. Pressbooks is compatible with any media that supports oEmbed. For more on embedded media and oEmbed content, check out the Embedded Media & Interactive Content chapter in our user guide.