I used XMLHttpRequest() to get C source code from server.
return HttpResponse(code, mimetype='text/x-c')
and I got correct source code when I checked it using alert(code).
like this
enter code here
#include<stdio.h>
int main(){
.....
}
and I split it into each lines in javascript.
var arr = code.split('\n');
window.document.getElementById("id").innerHTML = arr;
the result is like this.
#include
,int main(){
, ....
,}
I can't find <stdio.h>
I don't know why.... I dont think it's because of '<' character.
Cuz in for loop, I can find '<' character.
what's the problem?