Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author MadrasThemes

    (@madrasthemes)

    Hello there,

    Thank you for trying out our plugin. The plugin uses WordPress’s custom post types to create and manage Companies. You can use all the filters available for a post like the_excerpt or the_content to filter the content of the Company saved.

    Hope this helps. Let us know if you have any other questions or need further help.

    Thanks,
    S

    Thread Starter Vincent Poirier

    (@magikweb)

    There has been a misunderstanding by the person who originally wrote the ticket. It’s not the content of the company we are talking about, it’s the company fields. Some of them are using the type wp-editor and it’s those fields who are stripping the html tags off the text we enter. So in our case it’s all the fields I have circled in the following screenshot: https://prnt.sc/s1p0Be5SZZZA

    I’m sorry for the misunderstanding.

    Thread Starter Vincent Poirier

    (@magikweb)

    Hi! Just making sure this hasen’t gone unnoticed

    Thread Starter Vincent Poirier

    (@magikweb)

    I dug through the code and I found the cause. In the file class-mas-wp-job-manager-company-writepanels.php on the line 229, there is the sanitize_text_field function being used. This is the one line that removes the style from anything that was edited in the backend. May I suggest adding a hook, a filter or an option to bypass the sanitize_text_field? I bypassed it myself by editing the file but having the option to do it natively would be nice.

    Have a great day!

    Plugin Author MadrasThemes

    (@madrasthemes)

    Hello there,

    Apologies for not getting back earlier. The sanitisation is a way to make sure no malicious code is inserted. Having a filter would defeat the purpose of sanitisation.

    I advice you to not remove the code.

    Thread Starter Vincent Poirier

    (@magikweb)

    I understand that, but unfortunately we really have to. It’s stripping all the html tags which are necessary to have the content of those fields to display properly.

    The strange thing is, this does not happen when we are using the mas_submit_company_form. All the tags are staying when we use that form, but not when editing them in the wordpress admin.

    Plugin Author MadrasThemes

    (@madrasthemes)

    Are you referring to the frontend form submission shortcode?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘HTML being stripped upon saving’ is closed to new replies.