• Hallo,

    first of all, thank you for an awesome plugin.

    I use version 2.1.
    I have a custom field set via Types for a Post.
    This custom field is textarea.
    When I enter some value
    (for example, <p>AAA BBB</p>)
    and save it (Publish or Update a post),
    after reloading I see only <p>AAA BBB</p> in the field.
    So if I save it another time, my HTML entity will disappear.
    I’m speaking about admin area.

    How can I solve this problem?
    Any filter for escaping / unescaping?

    Thank you in advance

    https://wordpress.org/plugins/types/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Beda

    (@bedas)

    It should not happen.

    Make sure in Toolset > Settings > Custom content you have set the users to be allowed to use HTML tags.

    I use the Text Field (Multiple lines) a lot myself and it works

    Perhaps you are on a MultiSite?
    There te permissions are out of our control.

    Thread Starter shurix239

    (@shurix239)

    Hallo,

    thank you for a quick answer.
    It does preserve tags like <p> etc.
    But it does not preserve HTML entities like nbsp, mdash etc.

    I checked settings. Raw HTML (both) are set.
    But entities disappear. (((

    Plugin Support Beda

    (@bedas)

    What do you mean with “Raw HTML (both) are set”?

    HTML works perfectly fine if used correctly.

    Example of Contnet in Mutliple Lines Field:

    this is   non breaking space<br>
    this is &mdash;
    this is &lsquo;

    ShortCode:
    [types field='multiple-lines'][/types]

    Plugin Support Beda

    (@bedas)

    sorry, the non breaking space should be pre-followed by &nbsp;

    Thread Starter shurix239

    (@shurix239)

    Hallo,

    thank you for your reply.

    Frankly speaking, it does not resolve the problem.
    For example, I enter in Custom field (on the admin page) the text
    (I put underscores here only for visibility so that entites won’t disappear)

    <p>AAA &_amp_;&_nbsp_; BBB</p>

    I save the post. After reloading the page, I see

    <p>AAA &_nbsp_; BBB</p>

    If I save the post one more time. I see

    <p>AAA BBB</p>

    I hope my idea is clear.
    So I think some filter (escaping / unescaping) should be used
    as it’s used in the_content area.

    Sorry again, if smth is not clear.

    Plugin Support Beda

    (@bedas)

    Please add a Support Request here.
    It’s free, after you subscribe (also free) here.

    This is becuase, as you can see, the HMTL works fine for us.

    So it must be either a misunderstansing, which will be solved by getting acces to your site, or it’s a issue with your install.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘HTML entities in Custom fields don't save’ is closed to new replies.