Changeset 13213
- Timestamp:
- 02/15/2024 03:21:06 AM (7 months ago)
- Location:
- sites/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/dotorg/trac/pr/functions.php
r13081 r13213 398 398 399 399 // Convert Images (Must happen prior to Links, as the only difference is a preceeding !) 400 $desc = preg_replace( '#!\[(.+?)\]\( https?://(.+?)\)#', '[[Image(https://i0.wp.com/$2)]]', $desc );400 $desc = preg_replace( '#!\[(.+?)\]\((.+?)\)#', '[[Image($2)]]', $desc ); 401 401 // Convert Images embedded as `<img>`. 402 $desc = preg_replace( '#<img[^>]+src=(["\']) https?://(.+?)\\1[^>]*>#', '[[Image(https://i0.wp.com/$2)]]', $desc );402 $desc = preg_replace( '#<img[^>]+src=(["\'])(.+?)\\1[^>]*>#', '[[Image($2)]]', $desc ); 403 403 404 404 // Convert Links. -
sites/trunk/trac.wordpress.org/conf/common-extended.ini
r11310 r13213 56 56 max_size = 1048576 57 57 split_page_names = false 58 safe_origins = https://github.com/ 58 59 59 60 [ticket] -
sites/trunk/trac.wordpress.org/templates/site.html
r13191 r13213 5 5 6 6 <?python 7 scripts_version = '21 6'7 scripts_version = '217' 8 8 project_slug = req.environ['HTTP_HOST'].split(':')[0].split('.')[0] 9 9 wporg_endpoint = 'https://make.wordpress.org/' + project_slug + '/' -
sites/trunk/wordpress.org/public_html/style/trac/wp-trac.js
r12771 r13213 1743 1743 // Fetch the PRs immediately 1744 1744 fetchPRs(); 1745 1746 // deProxy github images, CORS changes. 1747 deProxyImages(); 1748 } 1749 1750 // See https://meta.trac.wordpress.org/ticket/7442 1751 function deProxyImages() { 1752 $('img[src*="i0.wp.com/github.com/"]').each( function() { 1753 var $this = $(this), $parent = $this.parent('a'); 1754 $this.removeAttr('crossorigin'); // We trust GitHub for these images. 1755 $this.prop( 'src', $this.prop('src').replace(/i0\.wp\.com/, '' ) ); 1756 $this.prop( 'alt', $this.prop('alt').replace(/i0\.wp\.com/, '' ) ); 1757 $this.prop( 'title', $this.prop('title').replace(/i0\.wp\.com/, '' ) ); 1758 $parent.prop( 'href', $parent.prop('href').replace(/i0\.wp\.com/, '' ) ); 1759 } ); 1745 1760 } 1746 1761
Note: See TracChangeset
for help on using the changeset viewer.