admin管理员组文章数量:1430591
I was pulling something from /
and found that it did not have any of the dynamically arranged titles. When I went to edit the page, I found a surprise.
I had originally entered a hand-typed:
<script src="/wp-content/javascripts/wrapped-book-table.cgi"></script>
However, while the SCRIPT tag was still there, it was mangled:
<script src="/wp-content/javascripts/wrapped-book-table.cgi" type="mce-no/type" data-mce-src="/wp-content/javascripts/wrapped-book-table.cgi"></script>
What converted the first into the second one, and what does "mce" refer to? This is not something I would have entered, and the type of "mce-no/type" probably defeated the JavaScript being treated in JavaScript.
(And what can I do to prevent the transformaation from recurring?)
I was pulling something from https://CJSHayward/books/
and found that it did not have any of the dynamically arranged titles. When I went to edit the page, I found a surprise.
I had originally entered a hand-typed:
<script src="/wp-content/javascripts/wrapped-book-table.cgi"></script>
However, while the SCRIPT tag was still there, it was mangled:
<script src="/wp-content/javascripts/wrapped-book-table.cgi" type="mce-no/type" data-mce-src="/wp-content/javascripts/wrapped-book-table.cgi"></script>
What converted the first into the second one, and what does "mce" refer to? This is not something I would have entered, and the type of "mce-no/type" probably defeated the JavaScript being treated in JavaScript.
(And what can I do to prevent the transformaation from recurring?)
Share Improve this question edited May 11, 2019 at 0:05 fuxia♦ 107k39 gold badges255 silver badges459 bronze badges asked Apr 12, 2017 at 7:42 Christos HaywardChristos Hayward 639 bronze badges 3- just a quick question, did you add that into the post or into your template? – marvinpoo Commented Apr 12, 2017 at 7:48
- 1 Lets repeat together, the editor is for content, not for code :(. – Mark Kaplun Commented Apr 12, 2017 at 8:21
- @MarkKaplun so true! – marvinpoo Commented Apr 12, 2017 at 8:22
2 Answers
Reset to default 0This is a known bug with TinyMCE. That is the standard text editor in WP. When you hit refresh whilst editing a page it adds those tags to javascript. https://github/tinymce/tinymce/commit/5f320ac2acda15902b0488df1b7d85bf5c24ef94
However it is marked as fixed some time ago (2015) so perhaps your site is not up to date? Or of course perhaps it has resurfaced!
(And what can I do to prevent the transformaation from recurring?)
Start with not putting Javascript into your Editor.
本文标签: tinymceWhy did my ltscriptgt get mangledand how can I keep from happening again
版权声明:本文标题:tinymce - Why did my <script> get mangled, and how can I keep from happening again? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745503927a2661158.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论