Support » Plugin: Custom Website Data » Multi-line data

  • Resolved billseymour

    (@billseymour)



    Good concept – I am trying it out right now.

    Do you support multi-line data? ie, one data entry with two lines:

    address-line-1
    address-line-2

    or

    address-line-1<br />
    address-line-21<br />

    Thus far, I tried adding some Html to a data field (use of <br /> ), and also the Ascii codes for < and >, but in both cases the Shortcode and the return function simply display the characters (<br />) and do not give me a new line.

    This would be most helpful. Thanks for the good work.

    https://wordpress.org/plugins/simple-custom-website-data/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author DannyWeeks

    (@dannyweeks)

    Hi billseymour,

    Sorry for the delayed reply.

    All HTML is stripped to avoid XSS but there are a few ways you could achieve what you want.

    The first way is to have multiple records for each line

    [cwd ref="address-line-1"] <br>
    [cwd ref="address-line-2"]

    The second way is to store your address as an array and loop through it adding the
    after each element.

    Your record would be added like:
    http://imgur.com/OXN0BjW

    <?php foreach(cwd_getThe('address') as $key => $line): ?>
    <?php echo $line ?><br>
    <?php endforeach;?>

    I will look into allowing certain markup to be stored in a future update.

    Hope this reply isn’t too late.

    Danny

    Danny-

    Thanks for the response. I will try out your suggestions.

    Re future update: I do think that some (not all) markup would be appropriate for inclusion. Certainly a line break would be helpful. The ability to add a link would also be of value, but I don’t know if that might raise the kind of security issues that require html-stripping in the first place.

    Plugin Author DannyWeeks

    (@dannyweeks)

    Your suggestions have been noted. Any other problems just let me know. Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Multi-line data’ is closed to new replies.