Hey Chris,

We are actually having this issue again in reviewboard 2.0.18, except with 
file uploads.

The src attribute of the image contains a relative link, the same as it is 
when you visit the actual review request (but the other attributes are 
different), eg: 

<img class="modified-image" 
src="/media/uploaded/files/2015/08/11/aecc3e18-0af0-45de-95a2-4530a7b1b8f9__BANHAMMER_400x100.png"
 width="38" 
height="62" alt="banned">

-Zach

On Thursday, March 4, 2010 at 3:37:57 PM UTC-5, Paul wrote:
>
> My users are complaining because reply mails that have comments to
> lines of code end up with relative URLs rather than absolute URLs.
>
> e.g.
> <a href="/r/42/diff/1/?file=173#file173line549" style="color: black;
> font-weight: bold; text-decoration: underline;">/ops/configuration/
> cfengine/inputs/cf.main</a>
>
> I wrote the following patch which I expected to fix this, but it
> didn't work. Any ideas on where I should look next?
>
> diff -ur ReviewBoard-1.5beta1-orig/reviewboard/templates/notifications/
> email_diff_comment_fragment.html ReviewBoard-1.5beta1/reviewboard/
> templates/notifications/email_diff_comment_fragment.html
> --- ReviewBoard-1.5beta1-orig/reviewboard/templates/notifications/
> email_diff_comment_fragment.html      2010-02-14 13:25:13.000000000
> -0800
> +++ ReviewBoard-1.5beta1/reviewboard/templates/notifications/
> email_diff_comment_fragment.html   2010-03-03 15:07:13.363661209 -0800
> @@ -5,7 +5,7 @@
>   <thead>
>    <tr>
>     <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid
> #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
> -    <a href="{{comment.get_absolute_url}}" style="color: black; font-
> weight: bold; text-decoration:
> underline;">{{comment.filediff.dest_file}}</a>
> +    <a href="{{domain_method}}://{{domain}}
> {{comment.get_absolute_url}}" style="color: black; font-weight: bold;
> text-decoration: underline;">{{comment.filediff.dest_file}}</a>
>      <span style="font-weight: normal;">
>  {% if comment.interfilediff %}
>       (Diff revisions {{comment.filediff.diffset.revision}} -
> {{comment.interfilediff.diffset.revision}})
> diff -ur ReviewBoard-1.5beta1-orig/reviewboard/templates/notifications/
> reply_email.html ReviewBoard-1.5beta1/reviewboard/templates/
> notifications/reply_email.html
> --- ReviewBoard-1.5beta1-orig/reviewboard/templates/notifications/
> reply_email.html      2010-02-14 13:25:13.000000000 -0800
> +++ ReviewBoard-1.5beta1/reviewboard/templates/notifications/
> reply_email.html   2010-03-03 15:05:28.383660132 -0800
> @@ -38,7 +38,7 @@
>
>    <table bgcolor="#f0f0f0" cellpadding="5" cellspacing="5"
> style="border: 1px solid #c0c0c0; margin-bottom: 10px">
>     <tr>
> -    <td><a href="{{comment.screenshot.get_absolute_url}}"
> style="color: black; font-weight: bold; font-size:
> 9pt;">{{comment.screenshot.image.name|basename}}</a></td>
> +     <td><a href="{{domain_method}}://{{domain}}
> {{comment.screenshot.get_absolute_url}}" style="color: black; font-
> weight: bold; font-size: 9pt;">{{comment.screenshot.image.name|
> basename}}</a></td>
>     </tr>
>     <tr>
>      <td><a href="{{domain_method}}://{{domain}}
> {{comment.screenshot.get_absolute_url}}"><img src="{{domain_method}}://
> {{domain}}{{comment.get_image_url}}" style="border: 1px black solid;"
> alt="{{comment.screenshot.caption}}"></a></td>
> diff -ur ReviewBoard-1.5beta1-orig/reviewboard/templates/notifications/
> review_email.html ReviewBoard-1.5beta1/reviewboard/templates/
> notifications/review_email.html
> --- ReviewBoard-1.5beta1-orig/reviewboard/templates/notifications/
> review_email.html     2010-02-14 13:25:13.000000000 -0800
> +++ ReviewBoard-1.5beta1/reviewboard/templates/notifications/
> review_email.html  2010-03-03 15:07:57.651160670 -0800
> @@ -15,7 +15,7 @@
>  {% for comment in review.screenshot_comments.all %}
>  <table bgcolor="#f0f0f0" cellpadding="5" cellspacing="5"
> style="border: 1px solid #c0c0c0; margin-bottom: 10px">
>   <tr>
> -  <td><a href="{{comment.screenshot.get_absolute_url}}" style="color:
> black; font-weight: bold; font-size:
> 9pt;">{{comment.screenshot.image.name|basename}}</a></td>
> +   <td><a href="{{domain_method}}://{{domain}}
> {{comment.screenshot.get_absolute_url}}" style="color: black; font-
> weight: bold; font-size: 9pt;">{{comment.screenshot.image.name|
> basename}}</a></td>
>   </tr>
>   <tr>
>    <td><a href="{{domain_method}}://{{domain}}
> {{comment.screenshot.get_absolute_url}}"><img src="{{domain_method}}://
> {{domain}}{{comment.get_image_url}}" style="border: 1px black solid;"
> alt="{{comment.screenshot.caption}}"></a></td>
>
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to