Changes between Version 3 and Version 4 of TracLinks


Ignore:
Timestamp:
22/02/2023 10:14:46 (21 months ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracLinks

    v3 v4  
    142142=== Link anchors
    143143
    144 To create a link to a specific anchor in a page, use '#':
     144To create a link to a specific anchor in a page, use `#`:
    145145{{{
    146146 [#Linkanchors Link anchors] or [[#Linkanchors|Link anchors]]
     
    148148  [#Linkanchors Link anchors] or [[#Linkanchors|Link anchors]]
    149149
     150To create an anchor in a page, use `[=#...]`:
     151{{{
     152 [=#myanchor my anchor] or empty form [=#myanchor]
     153}}}
     154 [=#myanchor my anchor] or empty form [=#myanchor]
     155
    150156Hint: when you hover your mouse over the title of a section, a '¶' character will be displayed. This is a link to that specific section and you can use this to copy the `#...` part inside a relative link to an anchor.
    151157
    152 To create a link to the first or last occurrence of a term on a page, use a ''pseudo anchor'' starting with '#/' or '#?':
     158To create a link to the first or last occurrence of a term on a page, use a ''pseudo anchor'' starting with `#/` or `#?`:
    153159{{{
    154160 [#/Milestone first occurrence of Milestone] or
     
    157163 [#/Milestone first occurrence of Milestone] or
    158164 [#?Milestone last occurrence of Milestone]
    159 This will also highlight all other matches on the linked page. By default only case sensitive matches are considered. To include case insensitive matches append '/i':
     165This will also highlight all other matches on the linked page. By default only case sensitive matches are considered. To include case insensitive matches append `/i`:
    160166{{{
    161167 [#/Milestone/i first occurrence of Milestone or milestone] or
     
    176182(Hint: The line numbers displayed in the source browser are links to anchors on the respective lines.)
    177183
    178 Since such links become outdated when the file changes, it can be useful to link using a '#/' pseudo anchor instead:
     184Since such links become outdated when the file changes, it can be useful to link using a `#/` pseudo anchor instead:
    179185{{{
    180186 [trac:source:trunk/trac/wiki/api.py#/IWikiSyntaxProvider IWikiSyntaxProvider] or
     
    269275If you'd like to create a direct link to the content of the attached file instead of a link to the attachment page, simply use `raw-attachment:` instead of `attachment:`.
    270276
    271 This can be useful for pointing directly to an HTML document, for example. Note that for this use case, you'd have to allow the web browser to render the content by setting [[TracIni#attachment-render_unsafe_content-option|"[attachment] render_unsafe_content"]] = `enabled`. Caveat: only do that in environments for which you're 100% confident you can trust the people who are able to attach files, as this opens up your site to [wikipedia:Cross-site_scripting cross-site scripting] attacks.
     277This can be useful for pointing directly to an HTML document, for example. Note that for this use case, you'd have to allow the web browser to render the content by setting [[TracIni#attachment-render_unsafe_content-option|"[attachment] render_unsafe_content"]] = `enabled`. Caveat: only do that in environments for which you're 100% confident you can trust the people who are able to attach files, as this opens up your site to [https://en.wikipedia.org/wiki/Cross-site_scripting cross-site scripting] attacks.
    272278
    273279See also [#export:links].