Subversion Repositories Kolibri OS

Rev

Rev 7747 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7747 Rev 7748
Line 153... Line 153...
153
	dword bufpos;
153
	dword bufpos;
154
	dword line_len;
154
	dword line_len;
155
	SetPageDefaults();
155
	SetPageDefaults();
156
	if (strstri(bufpointer, "
156
	if (strstri(bufpointer, "
157
	for (bufpos=bufpointer ; (bufpos < bufpointer+bufsize) && (ESBYTE[bufpos]!=0) ; bufpos++;)
157
	else if (strstri(bufpointer, "
-
 
158
	for (bufpos=bufpointer ; (bufpos < bufpointer+bufsize) && (ESBYTE[bufpos]!=0) ; bufpos++;)
158
	{
159
	{
159
		bukva = ESBYTE[bufpos];
160
		bukva = ESBYTE[bufpos];
160
		switch (bukva)
161
		switch (bukva)
161
		{
162
		{
162
		case 0x0a:
163
		case 0x0a:
Line 218... Line 219...
218
			strlwr(#tag);
219
			strlwr(#tag);
219
 
220
 
Line 220... Line 221...
220
			// ignore text inside the next tags
221
			// ignore text inside the next tags
221
			if (istag("script")) || (istag("style")) || (istag("binary")) || (istag("select"))  { 
222
			if (istag("script")) || (istag("style")) || (istag("binary")) || (istag("select"))  { 
222
				for (j=10; j>0; j--) tag[j]=tag[j-1];
223
				sprintf(#tagparam, "", #tag);
223
				tag[0] = '/';
-
 
224
				j = strstri(bufpos, #tag);
224
				j = strstri(bufpos, #tagparam);
225
				if (j!=-1) {
225
				if (j!=-1) {
226
					bufpos = j;
226
					bufpos = j;
227
				}
227
				}
-
 
228
				tag = tagparam = NULL;
228
				break;
229
				break;
229
			}
230
			}
Line 230... Line 231...
230
 
231
 
231
			if (tag[strlen(#tag)-1]=='/') tag[strlen(#tag)-1]=NULL; //for br/
232
			if (tag[strlen(#tag)-1]=='/') tag[strlen(#tag)-1]=NULL; //for br/
Line 392... Line 393...
392
	if (istag("blockquote")) { style.blq = opened; return; }
393
	if (istag("blockquote")) { style.blq = opened; return; }
393
	if (istag("pre")) || (istag("code")) { style.pre = opened; return; }
394
	if (istag("pre")) || (istag("code")) { style.pre = opened; return; }
394
	if (istag("img")) {
395
	if (istag("img")) {
395
		do{
396
		do{
396
			if (isattr("src=")) strcpy(#img_path, #val);
397
			if (isattr("src=")) strncpy(#img_path, #val, sizeof(img_path)-1);
397
			if (isattr("alt=")) sprintf(#line, "[%s]", #val);
398
			if (isattr("alt=")) && (strlen(#val)
398
			if (isattr("title=")) sprintf(#line, "[%s]", #val);
399
			if (isattr("title=")) && (strlen(#val)
399
		} while(GetNextParam());
400
		} while(GetNextParam());
400
		debugln(#val);
401
		style.image = true;
401
		style.image = true;
-
 
402
		text_color_index++;
402
		text_color_index++;
403
		text_colors[text_color_index] = 0x9A6F29;
403
		text_colors[text_color_index] = 0x9A6F29;
404
		if (!line) {
404
		if (!line) {
405
			if (!strncmp(#img_path, "data:", 5)) img_path=0;
405
			if (!strncmp(#img_path, "data:", 5)) img_path=0;
406
			sprintf(#line, "[%s]", #img_path+strrchr(#img_path, '/'));
406
			sprintf(#line, "[%s]", #img_path+strrchr(#img_path, '/'));