function activatePageReference(service, token, spacekey, page, pagetitles)
changed = 0;
for ii = 1: length(pagetitles)
    pagetitle = pagetitles{ii};
    result = strfind(lower(page.content),lower(pagetitle));

    testcharacters = {'[',']','_','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4','5','6','7','8','9','0'};
    if ~isempty(result)
        for i = 1: length(result)
            if ~ismember(lower(page.content(result(i)-1)),lower(testcharacters)) & ~ismember(lower(page.content(result(i)+length(pagetitle))),lower(testcharacters))
                changed = 1;
                page.content = [page.content(1:result(i)-1) '[' pagetitle ']' page.content(result(i)+length(pagetitle):end)];
            end
            result = strfind(lower(page.content),lower(pagetitle));
        end
    end
    if changed
        pagetext = page.content;
        page2 = getPage(service, token, spacekey, page.title);
        page2.content = pagetext;
        storePage(service, token, page2);
    end
end
