how to fix the error The content of elements must consist of well-formed character data or markup for <codeblock>
Posted: Thu May 07, 2020 9:54 am
Hello team , i am getting the following error when i try to insert the clipboardData content.
my insert code is :fragment="<codeblock>"+clipboardData+"</codeblock>";
Error : The content of elements must consist of well-formed character data or markup.
and the clipboardData is
when my clipboardData is the below one , the insert works fine
/* a long sample program */
Do forever
Say "Hello, World"
End
Thanks,
vishwa
my insert code is :fragment="<codeblock>"+clipboardData+"</codeblock>";
Error : The content of elements must consist of well-formed character data or markup.
and the clipboardData is
Code: Select all
int main() {
double scores[5] = {0.5, 1.5, 2.5, 3.5, 4.5};
for(int i = 0; i < 5; i++) {
cout << scores[i] >> " ";
}
system("PAUSE");
return 0;
}
/* a long sample program */
Do forever
Say "Hello, World"
End
Thanks,
vishwa