conti hat geschrieben:Was könnte man tun, um das glatt zu bügeln.
na ja man könnte den fehler beheben...
-> includes/include.con_editcontent.php
findet sich in einer 4.4.5r1
Code: Alles auswählen
// loop through all elements
for (var i=0; i < a.length; i++) {
aId = a[i].id;
aIdPrefix = aId.substr(0,4);
// search for the id which containes HTML
if (aIdPrefix == 'HTML') {
// check if its an 'contentEditable' Field
if (a[i].isContentEditable == true) {
// read out the content
var aContent = a[i].innerHTML;
// split the idname in data - datas 0 is the Fieldname 2 is the typeid
var data = aId.split("_");
if ( aContent == "" ) {
aContent = "!!";
} else {
// if there is an | in the text set a replacement chr because we use it later as isolator
while( aContent.search(/\|/) != -1 ) {
aContent = aContent.replace(/\|/,"§%%§");
}
}
// build the string which will be send
str += idart +'|'+ data[2] +'|'+ aContent +'|'+ data[0] +'||';
}
}
}
ich würde folgendes verwenden...
Code: Alles auswählen
// loop through all elements
for (var i=0; i < a.length; i++) {
aId = a[i].id;
if (aId != '' && typeof aId == 'string') {
aIdPrefix = aId.substr(0,4);
// search for the id which containes HTML
if (aIdPrefix == 'HTML') {
// check if its an 'contentEditable' Field
if (a[i].isContentEditable == true) {
// read out the content
var aContent = a[i].innerHTML;
// split the idname in data - datas 0 is the Fieldname 2 is the typeid
var data = aId.split("_");
if ( aContent == "" ) {
aContent = "!!";
} else {
// if there is an | in the text set a replacement chr because we use it later as isolator
while( aContent.search(/\|/) != -1 ) {
aContent = aContent.replace(/\|/,"§%%§");
}
}
// build the string which will be send
str += idart +'|'+ data[2] +'|'+ aContent +'|'+ data[0] +'||';
}
}
}
}
hmm... hab das jetzt aber nur auf einem ie getestet...
wirklich neu ist ja nur diese überprüfung:
im prinzip werden zwei dinge zusätzlich überprüft
1. ob das html element wirklich keine leere id hat
2. und wenn ja ob die id wirklich ein string ist