This problem come up at the office today. I am posting a solution here since it 
may come up in the future.

If you have a wiki (web2py wiki or not) which runs under https and contains 
links to http pages, modern browsers will block those links for security 
reasons.
To prevent the blocking, you can inject this code at the bottom of layout.html:

<script>window.jQuery || document.write('<script 
src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">\x3C/script>');</script>
<script> 
jQuery('a[href^="http://";]').on('click',function(){jQuery(this).attr('target','_blank');});</script>

It includes the jQuery library (if not alredyd installed) then hooks to the 
click events of every <a> tag when the href starts with http://. Before 
processing the click event it alters the tag by adding <a .... 
target="_blank">. this forces the link to open in a new window and it should 
by-pass the block.

Massimo

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to