Changeset 11371 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-trac-watcher/trac.php
- Timestamp:
- 12/15/2021 02:47:05 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-trac-watcher/trac.php
r11362 r11371 8 8 function format_trac_markup( $message ) { 9 9 $message = esc_html( $message ); 10 11 // Convert some Trac markdown to HTML. 10 12 $message = preg_replace( '!`(.*?)`!i', '<code>$1</code>', $message ); 11 13 $message = preg_replace( '!{{{(.*?)}}}!sm', '<code>$1</code>', $message ); 12 13 14 $message = preg_replace( '!\[([^] ]+) ([^]]+)\]!i', '<a href="$1">$2</a>', $message ); 14 15 15 // Escape shortcodes, but that takes out changesets.. 16 // $message = str_replace( [ '[', ']'], [ '[[', ']]' ], $message ); 16 // Mark up the text, using functions we want, rather than `the_content` as it has many filters that don't strictly apply. 17 $message = wptexturize( $message ); 18 $message = wpautop( $message ); 19 $message = make_clickable( $message ); 17 20 18 // Might need to disable this, or escape more things prior to it. 19 $message = apply_filters( 'the_content', $message ); 20 $message = make_clickable( $message ); 21 // Link tickets and changesets. 22 if ( function_exists( 'markup_wporg_links' ) ) { 23 $message = markup_wporg_links( $message ); 24 } 25 26 // Ensure nothing funny is in the output. 27 $message = wp_kses_post( $message ); 21 28 22 29 return $message;
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)