Ticket #4868 (closed Bug: fixed)

Opened 6 years ago

Last modified 3 years ago

spamProtect script enhancement

Reported by: ethomas Owned by: hannosch
Priority: trivial Milestone: 2.5
Component: Templates/CSS Keywords: newbie
Cc:

Description (last modified by hannosch) (diff)

Would be nice if the spamProtect script accepted a second paramater (string) to use as the link text. We could then do things like:

<a tal:replace="structure python: here.spamProtect(site_properties.email_from_address, site_properties.email_from_name)" />

which would produce:

<a href="&#0109;ailto&#0058;postmaster&#0064;localhost">Portal Administrator</a>

Of course, if you were to leave the second parameter out, the spamProtect script should display the email address as the link text.

Attached is a patch file to enable this functionality.

Attachments

spamProtect.patch Download (717 bytes) - added by ethomas 6 years ago.

Change History

Changed 6 years ago by ethomas

comment:1 Changed 6 years ago by hannosch

  • Keywords newbie added
  • Description modified (diff)

comment:2 Changed 6 years ago by hannosch

  • Owner changed from to hannosch

comment:3 Changed 6 years ago by alecm

  • Milestone changed from 2.5 to 2.5.x

comment:4 Changed 6 years ago by hannosch

  • Status changed from new to closed
  • Resolution set to fixed

(In [9922]) Added little spamProtect.py enhancement, to allow overwriting of the name that should be shown. This closes #4868. Also added a bunch of tests for other simple scripts.

comment:5 Changed 6 years ago by hannosch

  • Milestone changed from 2.5.x to 2.5

comment:6 Changed 3 years ago by hannosch

  • Component changed from Usability to Templates/CSS
Note: See TracTickets for help on using tickets.