This file is indexed.

/usr/lib/python2.7/dist-packages/sagenb/data/sage/js/published_worksheet.js is in python-sagenb 1.0.1+ds1-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//if notebook_lib.js becomes modular, escape0 can be loaded from it 
//

function escape0(input) {
    /*
    Escape the string for sending via a URL; also replace all +'s by
    %2B.

    INPUT:
        input -- string
    OUTPUT:
        a string

    TODO: Use the built-in encodeURIComponent function.
    */
    input = escape(input);
    input = input.replace(/\+/g, "%2B");
    return input;
}

function rate_worksheet() {
    /*
    Save the comment and rating that the uses chooses for a public worksheet.

    INPUT:
        rating -- integer
    */
    var rating, comment;
    comment = $("#rating_comment").val();
    rating = $(':radio[name="rating"]:checked').val();
    //i18n
    if (!rating){
        alert("Select a rating.");
        return;
    }
    window.location.replace("rate?rating=" + rating +
                                              "&comment=" + escape0(comment));
}

$(function (){
    $('#rate_button').click(rate_worksheet);
    $('#rating_comment').one('click', function (){
        this.value = '';
    });
});