Typecho are linked using the new window opens

Typecho default supports Markdown syntax, but Markdown label of a default in the current page jumps links, link if you want to belong to this site do not open a new window, only the outer link it opens a new window, and do not change the current attributes of a tag, just add a new window to jump this property, and do not slip through the net.

function themeInit($archive) { if ($archive->is('single')) { $archive->content = preg_replace('/<a\b([^>]+?)\bhref="((?!'.addcslashes($options->index, '/._-+=#?&').'|\#).*?)"([^>]*?)>/i', '<a\1href="\2"\3 target="_blank">', $archive->content); } }

Guess you like

Origin www.cnblogs.com/fdfgfggh/p/12014307.html