OpenESignForms / openesignforms

Open eSignForms is the first open source SaaS web contracting platform
https://open.esignforms.com
107 stars 50 forks source link

${file} and CKEditor link to File - link doesn't work in PDF and click warning leaving page #152

Closed OpenESignForms closed 9 years ago

OpenESignForms commented 9 years ago

When using the ${file:XXX} notation and/or using the Link to a File feature of the CKEditor causes a link to be generated that works in HTML mode. But the PDF links do not work as they become 'file:/' protocol. And clicking on the link in the HTML causes the "leaving page" warning dialog.

OpenESignForms commented 9 years ago

Fixed both of these. Appears that File links created in CKEditor were never working correctly because the regex that attempted to find them didn't take into account the fact that it's a combination of an A tag, some linked text/HTML, followed by an end-A tag. Also, added the javascript onclick to prevent clicks from leaving the page and causing the warning.