New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable shortcode use in job submission #1146
Comments
I agree, especially since all other fields specifically do NOT execute shortcodes, the only reason that shortcodes are being executed from the description field is because "technically" it's the add_filter( 'the_content', 'do_shortcode', 11 ); // AFTER wpautop() One thing to mention too, since the demo is using the Jobify theme, which does have code in it to execute shortcode inside the |
I tried testing in 2015 theme by doing something like this in the remove_filter( 'the_content', 'do_shortcode', 11 );
$description = apply_filters( 'the_job_description', get_the_content( $post ) );
add_filter( 'the_content', 'do_shortcode', 11 ); Which while it does work, what ends up happening is the main theme SOOO ... with that said, I think the best way to approach this to work correctly with themes and such, would be to strip all shortcode tags when a listing is submitted initially (or edited) ... that way if an admin wants to add shortcodes in the admin area they will still work, but it would prevent frontend users from submitting and saving listings with shortcodes in description. Thoughts? |
I would vote against stripping the content. We have a lot of people using shortcodes in the listing description area. I personally would continue to allow them by default -- but if they had to be removed I would go with removing the filter before calling |
@spencerfinnell Do you know which shortcodes folks are using in the job description? I agree that if we don't process shortcodes (using |
@jom Nothing really specific. Embedding 3rd party frames, sharing, etc. Mostly done by people submitting their own listings. But it's definitely a fairly common practice and we had lots of reports on one version where we disabled them ourselves. |
In 631072-zen, a person asked if there was a way to disable the ability for users on their site to submit shortcodes as part of the application process.
To replicate:
You’ll then see two things:
Example: https://demo.wpjobmanager.com/job/digitalznojko-2-test-shortcode-description/
Can we remove the ability for folks to submit shortcodes OR can we remove the ability for this shortcode to render when/if it is included?
The text was updated successfully, but these errors were encountered: