Coder Social home page Coder Social logo

Preview doesn't work everywhere about oembed HOT 2 CLOSED

wrav avatar wrav commented on September 27, 2024
Preview doesn't work everywhere

from oembed.

Comments (2)

reganlawton avatar reganlawton commented on September 27, 2024

This was changed due to an issue with JS errors on frontend for some users if the jquery wasn't used. I think two parts need to happen here. I think I need to refactor the jQuery out and secondly open the regex to additional areas of the admin panel

from oembed.

lukasgeiter avatar lukasgeiter commented on September 27, 2024

That doesn't really make sense though because the getIsCpRequest() check already excludes the frontend. I dug through the old issues and found issue #12 which seems to be the motivation for the regex.

The original problem is about the <script> tag being included in a JSON result. Only including assets in certain control panel areas isn't really the best fix for that. The assets should be included in all full page HTML results - or ideally only when the field itself is rendered as well.

Fortunately this is actually pretty easy to do. I've created a PR (#63) that should solve this issue along with #52.

from oembed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.