I'm trying to submit a form which consists of text fields and tiny mce editor. The tiny mce editor contains raw html elements like this
<a href="http://testserver/my-development-app/web/users/profile/4567/3323" target="_blank">View Profile</a>
After submitting the form via POST method using cakePHP, the href attribute of anchor tag value is automatically trimmed like this
<a href="../profile/4567/3323" target="_blank" rel="noopener noreferrer">View Profile</a>
What is wrong here? Why the href attribute url is trimmed after submitting the form ?
答案 0 :(得分:1)
您需要配置 tiny mce编辑器来处理网址。确保在你正在使用的javascript初始化中,你有这些行:
relative_urls : false,
remove_script_host : false,
convert_urls : true,
答案 1 :(得分:0)
您需要将relative_urls
设置为false
。默认情况下,TinyMCE将假定所有链接都与编辑器相关。