Welcome to Geeklog, Anonymous Friday, March 29 2024 @ 03:30 am EDT

Geeklog Forums

mailto: links don't work in stories - mailto: tag gets stripped out


Status: offline

webeddy

Forum User
Junior
Registered: 01/29/05
Posts: 15
Location:Washington State
I am trying to put mailto: links in the stories, but when you click on them they always refer to the url.

For example if I put the email address in without using the link editor the link goes to:
http://www.seattlewcswing.org/site/Tickets@Seattlewcswing.com

If I use the built in link editor and choose the email option this shows in the story on the web page
mailto:debbiefloyd@seattlewcswing.org
BUT this is where the link goes.
http://www.seattlewcswing.org/site/debbiefloyed@seattlewcswing.org

I tried writing the mailto link in the code, but mailto: gets stripped out when you save the story and it doesn't work.

Is there a way to fix this so I can use mailto: in stories?

webeddy
 Quote

Status: offline

webeddy

Forum User
Junior
Registered: 01/29/05
Posts: 15
Location:Washington State
Ok I figured it out myself. Just add mailto to this line. Oops!

// list of protocols that are allowed in links
$_CONF['allowed_protocols'] = array ('http', 'https', 'ftp','mailto'Wink;

Although that leads to another question. How can I allow PayPal buttons so I can put buy now buttons directly into a story?
webeddy
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: webeddy

How can I allow PayPal buttons so I can put buy now buttons directly into a story?


Just use the HTML code that PayPal provides. You may have to allow a few more HTML tags and attributes, though. See Why does Geeklog remove certain HTML tags?

bye, Dirk
 Quote

Status: offline

webeddy

Forum User
Junior
Registered: 01/29/05
Posts: 15
Location:Washington State
Ok I see where to do it. Would I just have to allow the form tag? Like this?

$_CONF['admin_html']['form'] = array ();

Or would you have to expand it to include all of the form inputs?
webeddy
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Text Formatted Code
$_CONF['admin_html'] = array (
...
    'form' => array ('action' => 1, 'method' => 1),
...

Similar for the input - list the tag on the left side, then all the attributes on the right. See the tags/attributes that are already there in config.php

bye, Dirk
 Quote

webeddy

Anonymous
thanks, I added the last line to this section and it works perfectly. Below I put a few notes for those who are not programmers (which I am not. I figure if I had the problem the next person to need this will find the same problems. Sorry if it's obvious to the highly trained among us.)

$_CONF['admin_html'] = array (
'p' => array('class' => 1, 'id' => 1, 'align' => 1),
'div' => array('class' => 1, 'id' => 1),
'span' => array('class' => 1, 'id' => 1),
'table' => array('class' => 1, 'id' => 1, 'width' => 1, 'border' => 1,
'cellspacing' => 1, 'cellpadding' => 1),
'tr' => array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1),
'th' => array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1,
'colspan' => 1, 'rowspan' => 1),
'td' => array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1,
'colspan' => 1, 'rowspan' => 1),
'form' => array ('action' => 1, 'method' => 1, 'target' => 1, 'input ' => 1, 'type' => 1, 'name' => 1, 'value' => 1, 'image' => 1, 'src' => 1, 'border' => 1, 'alt' => 1)
);

1. Be sure everything that will appear between the form tags will be in included in the array - including image, even though it may be accounted for elsewhere..
2. Make sure the last line does not have a comma after it.
3. When you paste the paypal code do it in the text editor not the html window. (although that kind of works and someone could probably figure out how to allow it, I just don't know enough to say how.)

Thanks again for your help, and I hope this helps the next person with the same problem get a quick answer.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: webeddy


'form' => array ('action' => 1, 'method' => 1, 'target' => 1, 'input ' => 1, 'type' => 1, 'name' => 1, 'value' => 1, 'image' => 1, 'src' => 1, 'border' => 1, 'alt' => 1)
);


I'm afraid that's wrong. <input> is a separate tag, so it needs its own entry:

Text Formatted Code
'form' => array ('action' => 1, 'method' => 1),
'input' => array ('type' => 1, 'name' => 1, 'value' => 1),

and so on (I didn't include all the attributes you may need).

bye, Dirk
 Quote

All times are EDT. The time is now 03:30 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content