fus-marcom / franciscan-react

A new website for Franciscan University of Steubenville built with ReactJS.
https://gcp.franciscan.university
MIT License
171 stars 79 forks source link

Stop modifying iframe src values #155

Closed JesseRWeigel closed 6 years ago

JesseRWeigel commented 6 years ago

We should keep doing this for images and pdfs, but not for iframes. It causes errors like this: https://dev.franciscan.university/campus-security/security-fire-safety-report

JesseRWeigel commented 6 years ago

We could probably use something like this from faculty.js

 const imgRegex = /(<img.src=")(.+)(")(.+)(\/>)/gi

            const { data } = result
            const faculty = data[this.props.type].edges[0].node
            const content = data[this.props.type].edges[0].node.content.replace(
              imgRegex,
              '<img src="https://storage.googleapis.com/fus-wp-storage/$2" $4 />'
            )