Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Links properties

(Page 2 of 2)
> >
Quote Reply
Re: [Paul] Strip HTML from Description In reply to
Hi Paul,

At the risk of sounding an idiot, is html stripping something I can already do from the admin panel?

Sorry I really don't know what ^[^><]{5,500}$ means or where you place this?


Crazy
Quote Reply
Re: [sooke] Strip HTML from Description In reply to
You'd place that in the regex field for your column on the Database > Links > Properties page.

^ # Match from the start
[^><] # Disallow any < or > in the field
{5,500} # Must be at least 5 chars and no more than 500
$ # Match right to the end
Quote Reply
Re: [Paul] Strip HTML from Description In reply to
Excellent!!! You learn somthing everyday.... or my case a load of things.
Quote Reply
Re: [sooke] Strip HTML from Description In reply to
Make sure it works before you get too happy :)

Last edited by:

Paul: May 1, 2002, 12:04 PM
Quote Reply
Re: [Paul] Strip HTML from Description In reply to
Paul, sorry, just a question on this:

If I now try to add a description when adding a link which is less then 5 characters, say I just put the letter 'T' links returns:

Description can not contain the value 'T'

Any way of getting to be a little more desciptive of what the actual error is in this case like:

Description must be at least 5 characters
Quote Reply
Re: [sooke] Strip HTML from Description In reply to
Unfortunately not....Links SQL processes the forms using a central processing system which uses default error messages.

You could put a little comment next to your add form like "No html please" and/or use some javascript to count the description and popup a message if it is too long.

Code:
<script>
function check() {
if (document.form_name.Description.value.match(/^.{501}/))
alert("Description too long.")
}
</script>

...or something similar.
Quote Reply
Re: [Paul] Strip HTML from Description In reply to
Great , thanks
Quote Reply
Re: [Paul] Strip HTML from Description In reply to
I don't aggree with your solution. Ok, it is easy to install & works, but it will block even those characters, what user wants in his text, but which are no html tags.

My opinion is to encode any special character to html entity so the user will not able to put any html strings in your text. If the user puts html into the text, it will display as text.
E.g.:
< should encode into &lt;
> should encode into: &gt;
& should encode to: &amp;

This way, any html will display as text.
The best known solution, to stop users to post html. Cool

Currently I use this encoding way on my working site, under Links v2.0.
Therefore I'm sure I will also implement this into one of my planned plugins. Probably to a plugin which is related to Link adding (maybe under the name of "Link Posting Tools" plugin).
It may be available as separate plugin or as plugin for my upcoming Extended Links plugin.
Link Posting Tools plugin will probably have features like:
- html protection,
- link preview,
- maximum Description length allowed,
- error checking features of filled fields,
- setting required fields,
- setting one required field of X fields,
- etc. (you may ask).
Of course all features will be optional.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Strip HTML from Description In reply to
>>
I don't aggree with your solution.
<<

Now theres a surprise ;)

>>
but it will block even those characters, what user wants in his text, but which are no html tags.
<<

Such as?....the only thing it blocks are < and > and there should be no reason for those in a description in any case. By encoding the tags someone could still paste a huge chunk of code into the description field whereas with mine they can't do that so in that respect it forces a more valid description.

>>
Link Posting Tools plugin will probably have features like:
- html protection,
- link preview,
- maximum Description length allowed,
- error checking features of filled fields,
- setting required fields,
- setting one required field of X fields,
- etc. (you may ask).
Of course all features will be optional.
<<

Again, most of these features exist by default. That is the whole point of the database editor Laugh

Last edited by:

Paul: May 2, 2002, 1:36 AM
Quote Reply
Re: [Paul] Strip HTML from Description In reply to
Quote:
the only thing it blocks are < and > and there should be no reason for those in a description in any case.
Personally, I do not like to force my users, not to use < or > characters, because they are characters, which could be freely used on any site & description (just to mention, if a site has an image,
where they use -=<MYSITE>=- as their special site name & image. Or when the user describes a directory in depth, like: Computers => Accessories. Just a few small examples.)

So I will not block usage of < or > characters. But of course I HAVE TO protect my site from the abuse, so the HTML usage. Therefore I use encoding.

Again, that's only my personal opinion, I told you already in my previous post.

Flame on...
It seems you are very against me. Your answers shows that. I don't know why. The reason, that sometimes I don't aggree with you, does not mean that I don't respect you and your prestige here in the forum. It only means, I have different opinion in some subjects. Not more, not less.
I will not dispute or argue with you about that.
Flame off...

Users will decide, if they use your suggestion or later will use the feature in one of my planned plugins.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Strip HTML from Description In reply to
>>
Flame on...
It seems you are very against me. Your answers shows that. I don't know why. The reason, that sometimes I don't aggree with you, does not mean that I don't respect you and your prestige here in the forum. It only means, I have different opinion in some subjects. Not more, not less.
I will not dispute or argue with you about that.
Flame off...
<<

Why would you think that?...its only constructive criticizm.....I've seen you disagree with my ideas too but I never thought you hated me Cool

...Im not saying my ideas are better than yours or vice versa Cool ...each should be given a fair hearing.

If you want to include existing features in your plugin and expand them a bit then its your plugin you can do as you please and if people buy it then that's even better....I just thought I'd show that you could do it without going to the trouble of writing a plugin. Everyone has different needs for their directory....if you want to allow < > in descriptions then go for it....but I personally wouldn't allow it so I gave a possible solution for those that think the same as me....and if only sooke found it useful then it was still worth posting.

Last edited by:

Paul: May 2, 2002, 3:16 AM
Quote Reply
Re: [Paul] Strip HTML from Description In reply to
Paul,

Quote:
Why would you think that?...its only constructive criticizm.....I've seen you disagree with my ideas too but I never thought you hated me Cool
I'm glad you say that! Cool I can just aggree with that. Wink Constructive criticizms are always welcome!

>...Im not saying my ideas are better than yours or vice versa Cool
>...each should be given a fair hearing.
Cool Cool

Peace,
Webmaster33
Quote Reply
Re: [webmaster33] Strip HTML from Description In reply to
If you are ever in doubt as to the intentions of my replies....assume I don't mean to be a meanie.

Sometimes I crawl out of bed (like in the other thread of Andy's) and see something I disagree with and then go off on one because I'm half asleep....I start getting a bit more cheery at 11am Laugh
Quote Reply
Re: [Paul] Strip HTML from Description In reply to
I am so glad you fellows made up!

I think both of your ideas are valid, and being more a user than a programmer, I rely on constructive critisim and different ways of doing things being presented.

So good for both of you!Smile
Quote Reply
Re: [webmaster33] Links properties In reply to
Hi Webmaster,

How's your plugin coming along?

I am interested in the number of my links in particular:

1. Link
Description blah blah

2. Link
Description blah blah

and so on...
Quote Reply
Re: [sooke] Links properties In reply to
I told you, link numbering feature is already implemented into the plugin. Many features already works, but there is no admin interface, there are no options, no installer, yet.
The current finishing state percent of Extended Links plugin is about 70%.

Please, be patient about the plugin release. It depends on my free time. I'm sure the v1.0 final version will be not finished earlier than this summer.

However, if you and some other users asks for an Early Preview Release (EPR), then I will release it, so you can buy it. Later, when the final version will be released, you can upgrade to final version for free.
But note: if I release an EPR, it may not have admin interface and there may not have options, yet. Moreover, buyers of Extended Links EPR plugin, will get e-mail or IRC help, if they have problems installing it.

Let me know, what you would like.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Links properties In reply to
Thanks for the update webmaster.

As I don't know exactly how many others are interested in your plugin or what will be included with the next update of Links, I might just wait for the finished product. I do understand you are writing this in your spare time, just wanted to know how things were going with itWink Thanks.
> >