When saving links to db i get amp; in the link

When saving links to db i get amp; in the link

ziv@kpmbro.comziv@kpmbro.com Posts: 73Questions: 28Answers: 4
edited November 2017 in General

Hi Allen

When i create new row with a link, some where in the processes sonething is doing url encode to the link...
i can see in the network debugger that the link is going out fine from the client side..

how can i fix it?

input client:

https://track.blabla.net/?offer_id=2614035&aff_id=599086

db:

https://track.blabla.net/?offer_id=2614035&aff_id=599086

Thanks

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,683Questions: 1Answers: 10,498 Site admin
  • ziv@kpmbro.comziv@kpmbro.com Posts: 73Questions: 28Answers: 4

    Hi Allen

    1. So do i need to fix in both places? (the table js and the php server side).
    2. I didn't understand completely where do i get the token..
    3. how should my server side should use the xss() method?
      example:
    $this->editor_instance->fields(Field::inst("users.link"));
    

    thanks

  • allanallan Posts: 63,683Questions: 1Answers: 10,498 Site admin
    Answer ✓
    $this->editor_instance->fields(Field::inst("users.link")->xss(false));
    

    Make sure you understand that it is potentially open to an XSS attack then. Use the information here to make sure that HTML is not rendered on the client-side (unless you want that).

    Allan

  • ziv@kpmbro.comziv@kpmbro.com Posts: 73Questions: 28Answers: 4

    Thank Allen, working perfect

This discussion has been closed.