Giter Site home page Giter Site logo

shortcode about eightshift-libs HOT 3 CLOSED

infinum avatar infinum commented on September 26, 2024
shortcode

from eightshift-libs.

Comments (3)

MetarDev avatar MetarDev commented on September 26, 2024

Hi @marijang ,

Possibly stupid question, have you echoed it? echo do_shortcode( '[mc4wp_form id="'.$id.'"]' ).

There's no reason I know of that would prevent shortcodes from working but then again this was never considered / tested since we don't use shortcodes. You can maybe try it on a component that's not echoed using wp_kses_post() but other than that I have no useful suggestions.

If you find the reason why shortcodes don't work and a fix , a PR would be most welcome.

from eightshift-libs.

marijang avatar marijang commented on September 26, 2024

i find why

I' m using mailchimp shortcode....
like:
echo wp_kses_post(Components::render( 'mailchimp', [ ....

change to..
echo Components::render( 'mailchimp', [

it works.
There is js code inside shortcode....

Thanks

from eightshift-libs.

MetarDev avatar MetarDev commented on September 26, 2024

Awesome! Even tho it's unsafe to have unfiltered components, it can't really be helped if this requires some 3rd party JS that Mailchimp's shortcode outputs (you'd have to allow the script tag either way for it to work).

Generally it would be a good idea / practice to write your own wp_kses() that allows only the tags added by the Mailchmp shortcode and nothing.

https://developer.wordpress.org/reference/functions/wp_kses/

Closing issue, resolved.

from eightshift-libs.

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.