RevCMS, My page

Results 1 to 6 of 6
  1. #1
    Member Sve9n is offline
    MemberRank
    Sep 2013 Join Date
    NorwayLocation
    69Posts

    RevCMS, My page

    Well i need some help here, im trying to make a biography where users can write stuff about them self. But when im making a new sentence, i get "\r\n" insted of going to the next line.

    Here's a pic:


    And this is my code:
    Code:
    <?php echo bbcode(smiley(nl2br(filter($data['bio_content'])))); ?>


    I
    appreciate any help.
    PS: Sorry for my crappy english.


  2. #2
    Valued Member Troll Hotel is offline
    MemberRank
    Nov 2012 Join Date
    SlovakiaLocation
    144Posts

    Re: RevCMS, My page

    try this
    Code:
     <?php echo bbcode(smiley(htmlspecialchars($data['bio_content']))); ?>

  3. #3
    Member Sve9n is offline
    MemberRank
    Sep 2013 Join Date
    NorwayLocation
    69Posts

    Re: RevCMS, My page

    Quote Originally Posted by Troll Hotel View Post
    try this
    Code:
     <?php echo bbcode(smiley(htmlspecialchars($data['bio_content']))); ?>
    That didnt work as i wanted, but it at least removed the "r/n"'s so thanks m8

  4. #4
    Valued Member Troll Hotel is offline
    MemberRank
    Nov 2012 Join Date
    SlovakiaLocation
    144Posts

    Re: RevCMS, My page

    Can you maybe explain me what you need? :D

  5. #5
    apt-get install xcowsay 3M1L is offline
    MemberRank
    Jul 2012 Join Date
    SwedenLocation
    268Posts

    Re: RevCMS, My page

    Try to replace them using this:
    PHP Code:
    $bioContent bbcode(smiley(nl2br(filter($data['bio_content']))));
    echo 
    str_replace(["\r""\n""\r\n"], "<br/>"$bioContent); 

  6. #6
    Member Sve9n is offline
    MemberRank
    Sep 2013 Join Date
    NorwayLocation
    69Posts

    Re: RevCMS, My page

    Quote Originally Posted by 3M1L View Post
    Try to replace them using this:
    PHP Code:
    $bioContent bbcode(smiley(nl2br(filter($data['bio_content']))));
    echo 
    str_replace(["\r""\n""\r\n"], "<br/>"$bioContent); 

    That didnt work either.. but thanks the effort


    edit:
    i replaced filter with htmlspecialchars and now it works, thanks for all the help :D
    Last edited by Sve9n; 10-10-15 at 12:36 AM.



Advertisement