|
451 | 451 | { |
452 | 452 | "data": { |
453 | 453 | "text/html": [ |
454 | | - "<iframe src=\"http://localhost:8000/_jRNIGvTsQISfQ9f4u9CJAQ\" style=\"width: 100%; height: auto; border: none;\" onload=\"{\n", |
| 454 | + "<iframe src=\"http://localhost:8000/_5LD0Qk7fQG2BpDyC1VAEbw\" style=\"width: 100%; height: auto; border: none;\" onload=\"{\n", |
455 | 455 | " let frame = this;\n", |
456 | 456 | " window.addEventListener('message', function(e) {\n", |
457 | 457 | " if (e.source !== frame.contentWindow) return; // Only proceed if the message is from this iframe\n", |
|
1167 | 1167 | { |
1168 | 1168 | "data": { |
1169 | 1169 | "text/html": [ |
1170 | | - "<a href=\"http://localhost:8000/_M6zpWKgqTvKGSmFW1LZNRg\" target=\"_blank\">Open in new tab</a>" |
| 1170 | + "<a href=\"http://localhost:8000/_w3FTt22HRf23fdXTLi4eGw\" target=\"_blank\">Open in new tab</a>" |
1171 | 1171 | ], |
1172 | 1172 | "text/plain": [ |
1173 | 1173 | "<IPython.core.display.HTML object>" |
|
1179 | 1179 | { |
1180 | 1180 | "data": { |
1181 | 1181 | "text/html": [ |
1182 | | - "<iframe src=\"http://localhost:8000/_M6zpWKgqTvKGSmFW1LZNRg\" style=\"width: 100%; height: auto; border: none;\" onload=\"{\n", |
| 1182 | + "<iframe src=\"http://localhost:8000/_w3FTt22HRf23fdXTLi4eGw\" style=\"width: 100%; height: auto; border: none;\" onload=\"{\n", |
1183 | 1183 | " let frame = this;\n", |
1184 | 1184 | " window.addEventListener('message', function(e) {\n", |
1185 | 1185 | " if (e.source !== frame.contentWindow) return; // Only proceed if the message is from this iframe\n", |
|
1600 | 1600 | { |
1601 | 1601 | "data": { |
1602 | 1602 | "text/html": [ |
1603 | | - "<iframe src=\"http://localhost:8000/_i3dfd3ZcRNiJUQ_VWokKtQ\" style=\"width: 100%; height: auto; border: none;\" onload=\"{\n", |
| 1603 | + "<iframe src=\"http://localhost:8000/_iAoSfI6gSuKeaSNqrKohlA\" style=\"width: 100%; height: auto; border: none;\" onload=\"{\n", |
1604 | 1604 | " let frame = this;\n", |
1605 | 1605 | " window.addEventListener('message', function(e) {\n", |
1606 | 1606 | " if (e.source !== frame.contentWindow) return; // Only proceed if the message is from this iframe\n", |
|
1867 | 1867 | { |
1868 | 1868 | "data": { |
1869 | 1869 | "text/html": [ |
1870 | | - "<iframe src=\"http://localhost:8000/_jDd25C_CTIajV0bsMTjzOg\" style=\"width: 100%; height: 500px; border: none;\" onload=\"\" allow=\"accelerometer; autoplay; camera; clipboard-read; clipboard-write; display-capture; encrypted-media; fullscreen; gamepad; geolocation; gyroscope; hid; identity-credentials-get; idle-detection; magnetometer; microphone; midi; payment; picture-in-picture; publickey-credentials-get; screen-wake-lock; serial; usb; web-share; xr-spatial-tracking\"></iframe> " |
| 1870 | + "<iframe src=\"http://localhost:8000/_BKeCyjE2TAyJCPV2_Le9Og\" style=\"width: 100%; height: 500px; border: none;\" onload=\"\" allow=\"accelerometer; autoplay; camera; clipboard-read; clipboard-write; display-capture; encrypted-media; fullscreen; gamepad; geolocation; gyroscope; hid; identity-credentials-get; idle-detection; magnetometer; microphone; midi; payment; picture-in-picture; publickey-credentials-get; screen-wake-lock; serial; usb; web-share; xr-spatial-tracking\"></iframe> " |
1871 | 1871 | ], |
1872 | 1872 | "text/plain": [ |
1873 | 1873 | "<IPython.core.display.HTML object>" |
|
2970 | 2970 | { |
2971 | 2971 | "data": { |
2972 | 2972 | "text/html": [ |
2973 | | - "<iframe src=\"http://localhost:8008/_lcysiC5NRne3jeT4Roy0Jg\" style=\"width: 100%; height: auto; border: none;\" onload=\"{\n", |
| 2973 | + "<iframe src=\"http://localhost:8008/_Z8F24y_hQMiCbnED9WguJg\" style=\"width: 100%; height: auto; border: none;\" onload=\"{\n", |
2974 | 2974 | " let frame = this;\n", |
2975 | 2975 | " window.addEventListener('message', function(e) {\n", |
2976 | 2976 | " if (e.source !== frame.contentWindow) return; // Only proceed if the message is from this iframe\n", |
|
3130 | 3130 | " template = '<img src=\"{}\" alt=\"{}\"{} class=\"max-w-full h-auto rounded-lg mb-6\">'\n", |
3131 | 3131 | " title = f' title=\"{token.title}\"' if hasattr(token, 'title') else ''\n", |
3132 | 3132 | " src = token.src\n", |
3133 | | - " if img_dir and not src.startswith(('http://', 'https://', '/')):\n", |
| 3133 | + " if img_dir and not src.startswith(('http://', 'https://', '/', 'attachment:', 'blob:', 'data:')):\n", |
3134 | 3134 | " src = f'{pathlib.Path(img_dir)}/{src}'\n", |
3135 | 3135 | " return template.format(src, token.children[0].content if token.children else '', title)\n", |
3136 | 3136 | " return FrankenRenderer" |
|
3167 | 3167 | "output_type": "stream", |
3168 | 3168 | "text": [ |
3169 | 3169 | "<p class=\"text-lg leading-relaxed mb-6\"><img src=\"/users/isaac-flath/my_image.png\" alt=\"test\" title=\"\" class=\"max-w-full h-auto rounded-lg mb-6 max-w-full h-auto rounded-lg mb-6\"></p>\n", |
| 3170 | + "\n", |
3170 | 3171 | "<p class=\"text-lg leading-relaxed mb-6\"><img src=\"static/my_image.png\" alt=\"test\" title=\"\" class=\"max-w-full h-auto rounded-lg mb-6 max-w-full h-auto rounded-lg mb-6\"></p>\n", |
3171 | | - "<p class=\"text-lg leading-relaxed mb-6\"><img src=\"https://example.com/img.png\" alt=\"test\" title=\"\" class=\"max-w-full h-auto rounded-lg mb-6 max-w-full h-auto rounded-lg mb-6\"></p>\n" |
| 3172 | + "\n", |
| 3173 | + "<p class=\"text-lg leading-relaxed mb-6\"><img src=\"https://example.com/img.png\" alt=\"test\" title=\"\" class=\"max-w-full h-auto rounded-lg mb-6 max-w-full h-auto rounded-lg mb-6\"></p>\n", |
| 3174 | + "\n", |
| 3175 | + "<p class=\"text-lg leading-relaxed mb-6\"><img src=\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiB\" alt=\"test\" title=\"\" class=\"max-w-full h-auto rounded-lg mb-6 max-w-full h-auto rounded-lg mb-6\"></p>\n", |
| 3176 | + "\n" |
3172 | 3177 | ] |
3173 | 3178 | } |
3174 | 3179 | ], |
3175 | 3180 | "source": [ |
3176 | 3181 | "print(render_md('', img_dir='static'))\n", |
3177 | 3182 | "print(render_md('', img_dir='static'))\n", |
3178 | | - "print(render_md('', img_dir='static'))" |
| 3183 | + "print(render_md('', img_dir='static'))\n", |
| 3184 | + "print(render_md('', img_dir='static'))" |
3179 | 3185 | ] |
3180 | 3186 | }, |
3181 | 3187 | { |
|
3222 | 3228 | { |
3223 | 3229 | "data": { |
3224 | 3230 | "text/html": [ |
3225 | | - "<iframe src=\"http://localhost:8008/_9sqkIqasTvOdm8snfj32IA\" style=\"width: 100%; height: auto; border: none;\" onload=\"{\n", |
| 3231 | + "<iframe src=\"http://localhost:8008/_Rjgl0haMQ2iP59xOmxmqig\" style=\"width: 100%; height: auto; border: none;\" onload=\"{\n", |
3226 | 3232 | " let frame = this;\n", |
3227 | 3233 | " window.addEventListener('message', function(e) {\n", |
3228 | 3234 | " if (e.source !== frame.contentWindow) return; // Only proceed if the message is from this iframe\n", |
|
3294 | 3300 | { |
3295 | 3301 | "data": { |
3296 | 3302 | "text/html": [ |
3297 | | - "<iframe src=\"http://localhost:8008/_N-s11_PFTo2VVA-wtJUCwA\" style=\"width: 100%; height: 350px; border: none;\" onload=\"\" allow=\"accelerometer; autoplay; camera; clipboard-read; clipboard-write; display-capture; encrypted-media; fullscreen; gamepad; geolocation; gyroscope; hid; identity-credentials-get; idle-detection; magnetometer; microphone; midi; payment; picture-in-picture; publickey-credentials-get; screen-wake-lock; serial; usb; web-share; xr-spatial-tracking\"></iframe> " |
| 3303 | + "<iframe src=\"http://localhost:8008/_GXhX1QgfStivfBjaSa8ayw\" style=\"width: 100%; height: 350px; border: none;\" onload=\"\" allow=\"accelerometer; autoplay; camera; clipboard-read; clipboard-write; display-capture; encrypted-media; fullscreen; gamepad; geolocation; gyroscope; hid; identity-credentials-get; idle-detection; magnetometer; microphone; midi; payment; picture-in-picture; publickey-credentials-get; screen-wake-lock; serial; usb; web-share; xr-spatial-tracking\"></iframe> " |
3298 | 3304 | ], |
3299 | 3305 | "text/plain": [ |
3300 | 3306 | "<IPython.core.display.HTML object>" |
|
3601 | 3607 | { |
3602 | 3608 | "data": { |
3603 | 3609 | "text/html": [ |
3604 | | - "<iframe src=\"http://localhost:8008/_bL-ObMZ2Qqyzn1fQ73N3EA\" style=\"width: 100%; height: auto; border: none;\" onload=\"{\n", |
| 3610 | + "<iframe src=\"http://localhost:8008/_1XCdP2InSESFkkurKNnfHw\" style=\"width: 100%; height: auto; border: none;\" onload=\"{\n", |
3605 | 3611 | " let frame = this;\n", |
3606 | 3612 | " window.addEventListener('message', function(e) {\n", |
3607 | 3613 | " if (e.source !== frame.contentWindow) return; // Only proceed if the message is from this iframe\n", |
|
0 commit comments