-
- 134 Posts
I noticed that when someone submits a list of URLs in a comment using Jot, the code inserts spaces in random places for all of the URLs after the first one. For example, if I list three URLs, the first one will be fine, but the rest will have a space in the URL somewhere, effectively breaking the URL. I assume this is there for anti-spam and anti-linking purposes, so that people won’t spam the site with links that they hope search engines will find.
That’s a handy feature, but I want to turn it off. How can I turn it off?
-
- 398 Posts
it’s not a feature, but I think it has something to do with the phx:length modifier...
it will break a line longer than 60characters with a space.. omit the :length modifier and you’re fine.
Armand Pondman
MODx Coding Team
::
Jot ::
PHx
-
- 134 Posts
Ok. I removed the "wordwrap" modifier in the comment chunk, which worked. It used to say:
<div class="jot-message">[+comment.content:wordwrap:esc:nl2br+]</div>
Now it says:
<div class="jot-message">[+comment.content:esc:nl2br+]</div>
The URLs themselves were not more than 70 characters long (this was the length set in the Jot snippet for wrapping) -- They were actually rather short, but because I had three URLs listed, it treated them like one long line of text, even though each one was listed on a new line. The person who submitted the comment had hit "enter" in between the URLs, so the resulting code looked like this, complete with line breaks (due to the nl2br modifier, I presume):
http://[domain here]/dsadler/about_me.html
http://[domain here]/ dsadler/goal_statement.html
http://[domain here]/dsadler/xhtml_samp ler.html
(I removed the domain to preserve privacy.) But notice that there are spaces in the 2nd and 3rd URLs. The lines themselves are not over 70 characters, from one
to the next, but the parser is treating them as if they were all one long line.
This is an issue that ought to be addressed in future versions of the parser code.
Thanks for helping me find out what was wrong.