M
M
Maxim Karakulov2015-01-29 18:13:22
PHP
Maxim Karakulov, 2015-01-29 18:13:22

How to solve the problem with htmlpurifier, which adds a dot to the link, following it, but marking the end of the sentence?

We use the htmlpurifier.org library to sanitize user input. One of the additional functions of this library is the conversion of the url entered by the user into a clickable html link. And we ran into a problem when the user puts a dot after the url, indicating the end of the sentence. Htmlpurifier includes this point in the created link, which is why the link is broken.
Is it possible to solve the problem using standard library methods? Or is it better to disable this link converter and use some other tool?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sivabur, 2015-02-20
@sivabur

There is such a good library called native_php
1. With the help of it, you check if there is a dot at the end-> delete

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question