mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: allow all characters in the anchor's name attributes (from r98252)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102635 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b73d75f907
commit
ee1fda176b
4
javascript/tiny_mce_improvements.js
vendored
4
javascript/tiny_mce_improvements.js
vendored
@ -72,7 +72,9 @@ LinkForm.prototype = {
|
|||||||
// this function collects the anchors in the currently active editor and regenerates the dropdown
|
// this function collects the anchors in the currently active editor and regenerates the dropdown
|
||||||
var refreshAnchors = function(selector) {
|
var refreshAnchors = function(selector) {
|
||||||
var anchors = new Array();
|
var anchors = new Array();
|
||||||
var raw = tinyMCE.activeEditor.getContent().match(/name="([a-zA-Z0-9-_]+?)"/gim);
|
// name attribute is defined as CDATA, should accept all characters and entities
|
||||||
|
// http://www.w3.org/TR/1999/REC-html401-19991224/struct/links.html#h-12.2
|
||||||
|
var raw = tinyMCE.activeEditor.getContent().match(/name="([^"]+?)"|name='([^']+?)'/gim);
|
||||||
if (raw && raw.length) {
|
if (raw && raw.length) {
|
||||||
for(var i = 0; i < raw.length; i++) {
|
for(var i = 0; i < raw.length; i++) {
|
||||||
anchors.push(raw[i].substr(6).replace(/"$/, ''));
|
anchors.push(raw[i].substr(6).replace(/"$/, ''));
|
||||||
|
Loading…
Reference in New Issue
Block a user